Generative AI - How It Works

Module 02 // Systems Briefing

How Generative AI Works

Follow the journey from large banks of training data to a generated response—and discover how testing, transformers and human feedback improve the system.

04 syllabus outcomes05 process stages01 improvement loop
DEVELOPMENT INPUT

Vast training data sets

→
STAGE 01 // TRAINING

The model learns patterns and relationships.

Learning Outcome

Stages of the Generative AI Process

2.1

A useful generative AI system is not created in one step. It first learns from large data sets, is evaluated with controlled unseen data, and is improved through reinforcement and human feedback. Once trained and tested, it can receive new data and prompts during inferencing.

DEVELOPMENT

Build Capability

Training develops initial capability by exposing the model to vast data sets and allowing it to identify patterns.

EVALUATION

Check Performance

Testing uses controlled, unseen information to assess how the model handles material it did not learn from.

IMPROVEMENT

Use Feedback

Reinforcement learning and RLHF use assessments and rewards to strengthen preferred response behaviour.

USE

Generate Responses

Inferencing applies the trained and tested model to new data and prompts.

Learning Outcome

The Use of Data

2.2

Good-quality training and testing data is extremely valuable. Training data teaches the model patterns, while separate test data evaluates the resulting performance. The two roles must remain distinct.

INPUT // LEARNING

Training Data

Enormous banks of information are supplied so the model can learn patterns used to construct responses.

  • Pre-training data is the first broad batch, before refinement or fine-tuning.
  • Later training data is usually more focused or specific.
  • Training data develops and refines model capability.
  • Data quality directly affects generated-output quality.
INPUT // EVALUATION

Test Data

Controlled, unseen information is used to assess the model after training.

  • It must not have been used in any training capacity.
  • It evaluates model performance and output.
  • It shows how the model handles unfamiliar information.
  • Its purpose is assessment, not teaching.
Data Role Explorer
SELECTED DATA TYPE

Pre-training data

Why must test data remain unseen? If the same information were used for both training and testing, the evaluation would not clearly reveal how well the model responds to genuinely new examples. Training data is like study material; unseen test data is like a new examination question used to assess understanding.
Data typePositionPurposeImportant characteristic
Pre-training dataFirst broad batchBuild a broad foundationUsed before refinement
Later training dataAfter pre-trainingFocus or refine capabilityOften more specific
Test dataAfter trainingAssess performance and outputMust remain unseen
Learning Outcome

The Role of Transformers

2.3

A transformer is a deep-learning architecture that uses attention mechanisms to process context and relationships between words. It helps the model predict likely next words, phrases, sentences and paragraphs. Repeating this process enables connected responses that can run into thousands of words.

PREDICTION AT EVERY STEP

Context → Prediction → Repetition

The transformer considers the prompt and the response generated so far. It estimates a likely continuation, adds it to the response, and repeats the operation using the expanded context.

01 // CONTEXTRead prompt and generated content.
02 // PREDICTSelect a likely continuation.
03 // REPEATExtend the response.
NEXT-WORD PREDICTOR
“Generative AI learns patterns from training …”

data 88%

servers 34%

screens 13%

Awaiting prediction…

WORDS

Likely Next Element

The transformer helps predict the next likely word from the available context.

PHRASES AND SENTENCES

Extended Prediction

The same capability supports connected phrases, sentences and paragraphs.

LONG RESPONSES

Thousands of Words

Continuing predictions allow lengthy output to build step by step.

LIMITATION

Fluency Is Not Accuracy

A detailed, confident and lengthy response may still contain inaccurate information.

Why transformers support long responses: a long answer is built through continuing predictions, with every new part becoming context for what follows. This supports coherence, but the model is predicting plausible continuations—not guaranteeing factual truth.
Learning Outcome

The Role of Feedback

2.4

Initial training provides broad capability, but model responses still require refinement. Human feedback shows what a desired response looks like and which generated responses are considered correct. The syllabus distinguishes supervised fine-tuning from reinforcement learning from human feedback.

MethodWhat the human doesWhat the model receivesCore distinction
SFTCreates a desired responseA prompt-response training exampleThe human supplies the target answer.
RLHFChecks generated responsesA reward signal for preferred responsesThe human judges the model's answer.
Continuous fine-tuning: feedback and adjustment are ongoing rather than one-time activities. Repeated refinement helps explain why generative AI systems may improve over time.
Exam-focused Recap

Remember the Distinctions

RECAP
TRAIN vs TEST

Learn and Evaluate

Training data develops capability; unseen test data assesses performance.

PRE-TRAIN vs TRAIN

Broad then Focused

Pre-training is the first broad batch; later data is more focused or specific.

TRAIN vs INFERENCE

Develop and Use

Training develops the model; inferencing applies it to new data and prompts.

SFT vs RLHF

Answer and Reward

SFT supplies a desired response; RLHF rewards a preferred model response.

TRANSFORMER

Predict and Repeat

Continuing predictions create connected words, sentences and paragraphs.

FLUENCY vs FACT

Length Is Not Accuracy

Long, confident output can still contain incorrect information.

Knowledge Check

Test Your Understanding

10 QUESTIONS
SCORE // 0 / 10
Reference Index

Searchable Glossary

KEY TERMS
EXIN BCS Generative Artificial Intelligence Award // Module 02
Unofficial interactive study aid based on the supplied Chapter 2 content.