Look, score, pick, repeat
Same question, two answers
Type "write one sentence about the sea" into a chatbot twice. One time you might get "The sea stretched out grey and restless under a low sky", the next "Waves rolled onto the shore in long, shining lines." Nothing was looked up differently and nothing was remembered. The difference comes from how the answer is built, one small piece at a time, and that is what this lesson unpacks.
It works in word pieces, not words
A chatbot does not read or write whole words. It splits text into small chunks called tokens. A short word like "cat" is usually one token; a long word like "unbelievable" may become three: "un", "believ" and "able". Spaces and punctuation count too. This is why tools describe limits and prices in tokens rather than words, and why a page of text is roughly a few hundred of them.
It scores every possible next piece
Given the text so far, the model works out a score for every token it knows: how well would this fit next? For "The cat sat on the", "mat" scores high, "sofa" a bit lower, "Tuesday" very low. Then it picks one, and here is the key: it does not always take the top score. A controlled amount of randomness lets a lower-scoring piece through now and then. That early, small difference carries forward, so two answers drift apart.
Where the scores come from
The scores are not looked up in a database of answers. They come from training: the model was shown an enormous amount of text and gradually adjusted billions of internal numbers until it got good at predicting the next piece. Those learned numbers are the model. That is also why a chatbot can sound fluent and still be wrong. It produces what fits, not what has been checked. Keep that in mind; lesson 4 builds on it.
Before reading on: why do you think the same question can produce two different answers?