How AI Builds Its Response

AI doesn't compose an answer. It predicts the next word, then the next, then the next.

The Analogy

How AI Builds Its Response

Autocomplete on your phone, but trained on the entire internet. AI doesn't compose an answer. It predicts the next word, then the next, then the next. It doesn't know facts -- it knows what word usually comes next.

Use the arrows below, the dots above, or your keyboard arrow keys to move through the stages.

Stage 1 -- Probability Competition

Which Word Wins?

The capital of France is

The model didn't look up this fact. "Paris" has 92% probability because of pattern frequency. Pattern matching, not knowledge.

Stage 2 -- Building Token by Token

One Word at a Time

Once upon a time, there was a
Click "Generate" to see the next token predictions

One token at a time. Each new token changes the next prediction.

Stage 3 -- Temperature

Predictable or Creative?

The best way to learn is by
Precise Balanced Creative
Temperature: 0.7
Multiple options are viable. The model usually picks "doing" but sometimes surprises you. Good balance of quality and variety.
Stage 4 -- The Hallucination Seed

When Patterns Lie

The first person to walk on Mars was
Nobody has walked on Mars.

The pattern predicts a name. The model doesn't know the answer is wrong -- it just knows what token fits the pattern "first person to walk on [place] was." This is hallucination.

Takeaway

AI predicted the most likely next token, not the most accurate fact. Verify claims that matter.

AI builds responses by predicting the most likely next token. But "most likely" isn't the same as "correct." What happens when the pattern points confidently in the wrong direction? →