Why this matters
A chatbot writing a fluent paragraph is not retrieving an answer. It is choosing a likely next word, then another, then another. Almost everything that is surprising about these systems, the good and the bad, follows from that one fact, so it is worth getting straight.
The idea
A language model learns from large amounts of text to predict which word is likely to come next, picking up patterns of usage and phrasing along the way. Generating text is just repeating that prediction:
| Step | Input so far | Predicted next |
|---|---|---|
| 1 | "Today's weather is" | "sunny" |
| 2 | "Today's weather is sunny" | "and" |
| 3 | "Today's weather is sunny and" | "warm" |
For each candidate the model computes a probability of coming next, from patterns learned in training, which is why it can handle phrasings that never appeared in its training data.
Here is the consequence that matters. What it selects is not the correct word but a statistically plausible one. That is precisely why hallucination happens: responses that differ from the facts but are phrased entirely convincingly. It is not a bug that careful engineering removes; it falls directly out of how generation works.
A large language model is one built on a very large network trained on vast internet text. "Large" means two things: training data measured in billions to trillions of words, and parameters, the network's weights, numbering in the billions to trillions. Researchers observed that past a certain scale of either, qualitatively new abilities appear, such as complex reasoning, summarising, translating, and generating code. ChatGPT, Claude and Gemini are built this way.
Training on text alone does not make a model useful, though. It may miss the intent of a question or produce inappropriate content. RLHF fixes that in three stages: train the model on text; have humans judge which responses are more desirable; then use those judgments as rewards to tune it by reinforcement learning. The reason these systems feel easy to talk to owes a great deal to this step.
Multimodality is one model handling several kinds of data, text, images, audio and video, where each kind is a modality. Early language models handled only text.
Note what RLHF does and does not solve. It makes answers more helpful and better aimed at the question. It does not make the model's facts reliable, because it is still rewarded for responses people rate well, and a confident wrong answer often reads better than a hedged right one.
Picture it
flowchart LR P["Prompt: 'Today's weather is'"] --> M[Language model] M --> W1["probabilities over next words"] W1 --> S["pick a plausible one: 'sunny'"] S --> M S --> T["Fluent text, not verified fact → hallucination"]
Worked example
A school club uses a chatbot to draft short articles on local history. Where does it help, and where must it not be trusted?
It genuinely saves effort on shape and language: turning rough notes into readable prose, tightening a paragraph, suggesting a structure. Nothing there depends on the model knowing facts.
Dates, names and places are the opposite. Asked when a local mosque was built, the model produces the year that most plausibly follows the words before it. If the real date is rare in its training text, a plausible-looking wrong year is exactly what next-word prediction produces, and it will be stated with the same confidence as a correct one. Fluency is no signal at all here, because fluency is the thing it actually optimises.
So the rule for the club: the model may draft, and every specific claim gets checked against a real source before publishing. And RLHF does not rescue this. It tuned the model toward answers people approve of, not answers that are true, which is precisely why a confident fabrication can score well.
Your turn
Try the practice questions for this lesson. Judge statements about how text is generated, match each term to its description, and explain what makes a language model large.
Take it further
A club wants to use a chatbot to help write short articles on local history for the school website. Should it publish what the AI writes, or verify first?
- Decide where it helps. Name one part of the task where the chatbot genuinely saves effort, and one part where its output must not be trusted as it stands.
- Analyse the risk. Using how a language model chooses words, explain why it might state a wrong date or an invented name confidently, and describe exactly how the club would catch that before publishing.
- Decide the safeguards. State the rule the club should follow for every AI-written article, and say what RLHF-style tuning does and does not solve here.
The model is rewarded for sounding right, not for being right. Dates, names and places are exactly what it can get confidently wrong.
Recap
- A language model generates text by repeatedly predicting a plausible next word.
- Plausible is not true, which is where hallucination comes from.
- "Large" means vast training data and billions to trillions of parameters; new abilities appear past a certain scale.
- RLHF tunes a model toward desirable responses using human judgments as rewards.
- Multimodality lets one model handle text, images and audio together.