Next-Word Prediction: The One Trick Behind Everything
Type “the cat sat on the” into any phone keyboard and it suggests “mat.” Type a full paragraph into a large language model and, underneath everything it does, that’s still the operation running: guess the most likely next token, add it to the text, guess again. Scale that single trick up by feeding it essentially a large fraction of the public internet, run it recursively hundreds of times per reply, and you get something that can write code, draft contracts, or hold a conversation. It’s easy to assume something more sophisticated must be happening underneath. Mostly, it isn’t.
One operation, run in a loop
At each step, the model looks at every token generated so far and computes a probability for each candidate that could come next, out of a vocabulary that typically runs into the tens of thousands of possible tokens. It picks one (how it picks is a separate, tunable setting, not part of today’s story), appends it to the sequence, and repeats the exact same calculation with one more token of context than before. A reply that looks like a paragraph of reasoning is, mechanically, this same narrow operation executed several hundred times in a row, each output feeding back in as input for the next guess.
The keyboard-autocomplete analogy holds up better than it should. The difference isn’t the trick, it’s the scale and the recursion: a phone keyboard suggests one word and stops, while the model treats its own previous guess as new context and keeps going, which is how a chain of single-word predictions turns into something that reads like an argument, a story, or a working function.
Why this is the root, not a side effect
This is why the same underlying process produces both the strengths and the central weakness of these systems. Fluency, versatility across tasks, the ability to write a sonnet and a SQL query in the same session: all of it comes from this one operation applied to different contexts. But the operation is optimizing for one thing only, statistical plausibility given the preceding text, and plausible is not the same target as true. There’s no separate fact-checking step wired into that loop. Nothing in the core mechanism asks whether the next token is correct, only whether it’s the kind of thing that tends to follow the previous ones.
The insight worth sitting with
What gets missed is that this isn’t a design flaw sitting next to the “real” intelligence, waiting to be patched out. Predicting the next plausible token is the entire mechanism. The unwanted confident errors and the useful fluent answers come out of the identical process; you cannot remove the tendency to guess without removing the model’s ability to generate anything at all. That reframes every “we fixed hallucinations” headline: nobody has removed the guessing, because removing it means removing the model. What actually happens is that something gets bolted on around the outside, a retrieval step, a verifier, a human check, to catch the guesses that went wrong. The guessing itself never stops.
This piece sets up two threads that come up constantly in AI coverage: how the model’s blind guessing turns into outright hallucination when there’s no external check in place, and how it “sees” the text it’s guessing over in the first place, not as letters or whole words but as fragments called tokens. Both are coming next in this series.