• How Large Language Models Actually Predict the Next Word

    A plain-language look at what’s actually happening when an AI chatbot generates a response, one token at a time.

    Read more

    Ask an AI chatbot a question and it feels like it’s "thinking." What’s actually happening underneath is narrower and stranger than that: the model is repeatedly predicting the single most likely next chunk of text, called a token, based on everything written so far.

    Tokens, Not Words

    Text gets broken into tokens before a model ever sees it — sometimes whole words, sometimes word fragments. The model doesn’t reason in English; it reasons in these fragments, converting them into long lists of numbers it can do math on.

    Prediction, One Step at a Time

    At each step, the model looks at every token so far and calculates a probability for what comes next, across its entire vocabulary. It picks one, adds it to the text, and repeats. A whole paragraph is really thousands of these tiny predictions chained together.

    Where the Predictions Come From

    Those probabilities come from patterns learned during training, when the model was shown enormous amounts of text and adjusted itself to get better at guessing the next token. Nothing is "recalled" the way a search engine recalls a webpage; it’s regenerated fresh each time.

    Why This Explains Both the Magic and the Flaws

    This next-token mechanism is why these models write fluently about almost anything, and why they can state a wrong fact with total confidence — fluency and accuracy are separate properties. A sentence can be grammatically perfect and statistically likely while being factually wrong.

    What This Means Practically

    Treat fluent-sounding output as a draft to verify, not a verdict, especially for facts, numbers, or anything with real consequences.