Lesson 2 — How AI Predicts the Next Word
In Lesson 1 you picked the most plausible next word. Now look closer at how you knew which word was plausible — because the same idea is the engine inside every AI assistant.
This activity needs JavaScript enabled. The lesson below still covers everything.
What changed your answer
The word stayed the same — "reached for the ___" — but your best guess flipped the moment the sentence told you who was reaching. A chef reaches for salt; a judge reaches for a gavel. You did not compute the most common word in all of English. You computed the most likely word given the words already in front of you.
That little phrase — "given what you already know" — is one of the most useful ideas in all of AI. It has a name: conditional probability. The "condition" is simply the information you already have. New information changes the odds.
You use it constantly without naming it. The chance of rain is one number in general — and a very different number given that the sky is already dark and the wind just picked up. Same event, more information, updated odds.
Why this is the engine inside an AI
A language model reads everything written so far — that is its "condition" — and then asks: given all of that, which word is most likely to come next? It does this one word at a time, each new word becoming part of the condition for the word after it.
This is why the same question can get different answers depending on how you set it up. The words you put before the model are the condition. Give it more relevant context and you shift the odds toward a better answer — which is the whole skill you will practice in the prompting lesson.
Likely next word — given the context — or not?
For each sentence below, decide whether the suggested next word is a plausible continuation given everything before it. Instant feedback — guessing is how you learn the pattern.
This activity needs JavaScript enabled. The lesson below still covers everything.
The one trap to remember
"Most likely given the context" is not the same as "true." A model can be confidently steered by the words around it — including misleading ones. If the context points the wrong way, the most plausible next word can be plausibly wrong. That is the same lesson from before, seen from a new angle: the model predicts; you verify.
Quick check
This activity needs JavaScript enabled.