{"course":{"slug":"ai-actually-explained","title":"AI, Actually Explained","url":"https://addaly.com/learn/ai-actually-explained","level":"beginner","track":"start"},"lesson":{"slug":"the-next-word-game","title":"One chunk at a time, and it cannot take it back","url":"https://addaly.com/learn/ai-actually-explained/the-next-word-game","position":22,"of":92,"minutes":9,"answer":"Each token is generated from everything before it and can never be retracted, so a wrong opening produces confident elaboration rather than a correction: edit and regenerate instead of arguing.","keyIdea":"Each token is generated from everything before it and can never be retracted, so a wrong opening produces confident elaboration rather than a correction: edit and regenerate instead of arguing."},"body":{"format":"markdown","text":"## The whole loop\n\nHere is everything a language model does, in five steps.\n\n1. It reads all the tokens so far: the hidden instructions, your message, the conversation, and whatever it has already written this turn.\n2. It produces a probability for **every token in its vocabulary**. Not a word: a score for all 100,000-odd possibilities at once.\n3. A separate piece of code picks one of them, usually favouring the likely ones.\n4. That token is added to the end of the text.\n5. Go back to step one.\n\nThat is the entire mechanism. \"The capital of France is\" produces a distribution in which ` Paris` might hold 95% and everything else shares the rest. Pick it, append it, read the whole thing again, predict the next.\n\nThis is called **autoregressive** generation, and everything below follows from it.\n\n## It re-reads everything, every time\n\nThe model holds no state between tokens. To produce your reply's fiftieth word it processes the entire conversation again, from the first hidden instruction to the forty-ninth word it just wrote.\n\n(Providers cache intermediate results so this is faster than it sounds, but conceptually and for billing it is what happens.)\n\nTwo consequences. A long conversation is more expensive per message than a short one, because you are re-sending everything each turn. And there is no memory anywhere except the text itself, which is why the previous module's point about corrections vanishing is not a design oversight but the shape of the thing.\n\n## It cannot plan the end of the sentence\n\nAt the moment it emits a token, nothing has decided how the sentence finishes. Each choice is made from what came before.\n\nWhich raises a fair question: how does it write a coherent five-paragraph answer, then? Because the early tokens constrain the later ones so tightly. Having written \"There are three reasons for this. First,\" the text now overwhelmingly implies that a second and third will follow, and the model is very good at honouring what the text implies. Structure emerges from constraint rather than from a plan.\n\nThis also predicts a real failure. Ask for exactly seven items and you often get six or eight, because at no point does anything count. Ask for a poem where the last line must land a specific joke and it will frequently write towards a different landing, because the ending was never chosen in advance.\n\n## The most useful idea in this lesson: it commits\n\nOnce a token is emitted, it is part of the input. There is no backspace.\n\nIf the model begins an answer with a wrong number, every subsequent token is generated in a context where that number is established fact. The overwhelmingly likely continuation of a confident wrong claim is more confident wrong elaboration. You will watch it construct supporting detail around an error rather than reverse into it, and this looks like stubbornness or dishonesty. It is neither. It is the arithmetic of continuation.\n\nThree practical moves follow directly:\n\n- **When it goes wrong, do not argue with it. Edit or restart.** Most interfaces let you edit your previous message and regenerate. That removes the bad text from the context entirely. Arguing leaves the error in place, where it keeps exerting influence.\n- **Ask for reasoning before the answer, never after.** \"Work through it, then give the total\" puts the working in the context where it can influence the total. \"Give the total, then explain\" produces an explanation of a number already committed to, which is why such explanations so often justify a wrong answer fluently.\n- **Ask for options before a recommendation.** Once it has recommended, it is arguing a case.\n\n## Why \"thinking\" helps at all\n\nEach token gets a fixed amount of computation. Hard questions do not get more than easy ones. The only way for a model to spend more effort on a problem is to produce more tokens before committing to the answer.\n\nThat is what chain-of-thought prompting does, and it is why \"let us work through this step by step\" measurably improves accuracy on multi-step problems. It is not that the model is encouraged to try harder. It is that the intermediate tokens are real working, held in the context, and the final answer is then predicted from working rather than from the question alone.\n\nThe reasoning models released from late 2024 onwards industrialise this: they are trained to generate a long private working-out before answering. Slower, dearer, and better at anything with steps in it. They have their own lesson later."},"check":{"question":"A model gives a wrong total, the user points out the error, and the model apologises and produces a detailed justification of the same wrong total. What does this reveal?","options":[{"text":"The model is optimised to defend its answers, because users rated confident responses more highly.","correct":false,"tempting":"Invokes preference training, which does push towards confidence, but does not explain why the specific wrong figure persists in the context."},{"text":"The model has cached the earlier calculation and is retrieving it rather than recomputing.","correct":false,"tempting":"Assumes a stored result; nothing is cached as a value, and the figure persists because it is text in the context."},{"text":"The wrong total is now part of the input text, so the likeliest continuation is elaboration consistent with it rather than a reversal.","correct":true},{"text":"The user's correction was too polite, and a firmer instruction would trigger a recalculation.","correct":false,"tempting":"Treats it as a phrasing problem; a firmer correction still leaves the wrong figure in the context exerting the same pull."}]},"prev":{"slug":"words-into-tokens","title":"Text is chopped up before the model sees it","url":"https://addaly.com/learn/ai-actually-explained/words-into-tokens"},"next":{"slug":"attention-what-it-does","title":"Attention, without a single equation","url":"https://addaly.com/learn/ai-actually-explained/attention-what-it-does"},"authorship":"Founder and series editor: Dr Mustafa Mun. Written by AI models to a written standard. Exam keys checked blind by a second model: 3,665 of 3,666 agreed. Academic review invited.","review":{"status":"Draft, open for academic review"},"cite":"Addaly (2026) 'One chunk at a time, and it cannot take it back', in AI, Actually Explained. Edited by M. Mun. Addaly. Available at: https://addaly.com/learn/ai-actually-explained/the-next-word-game (Accessed: 13 October 2026).","licence":{"name":"CC BY-NC-SA 4.0","url":"https://creativecommons.org/licenses/by-nc-sa/4.0/"},"reader":{"schema":1,"title":"One chunk at a time, and it cannot take it back","courseTitle":"AI, Actually Explained","module":{"index":3,"slug":"how-a-chatbot-works","title":"What a chatbot is actually doing"},"answer":null,"keyIdea":"Each token is generated from everything before it and can never be retracted, so a wrong opening produces confident elaboration rather than a correction: edit and regenerate instead of arguing.","hero":{"kind":"plate","image":null,"alt":null,"caption":null},"blocks":[{"t":"h2","id":"the-whole-loop","runs":[{"text":"The whole loop"}]},{"t":"p","runs":[{"text":"Here is everything a language model does, in five steps."}]},{"t":"ol","start":1,"items":[[{"text":"It reads all the tokens so far: the hidden instructions, your message, the conversation, and whatever it has already written this turn."}],[{"text":"It produces a probability for "},{"text":"every token in its vocabulary","b":true},{"text":". Not a word: a score for all 100,000-odd possibilities at once."}],[{"text":"A separate piece of code picks one of them, usually favouring the likely ones."}],[{"text":"That token is added to the end of the text."}],[{"text":"Go back to step one."}]]},{"t":"p","runs":[{"text":"That is the entire mechanism. “The capital of France is” produces a distribution in which "},{"text":" Paris","code":true},{"text":" might hold 95% and everything else shares the rest. Pick it, append it, read the whole thing again, predict the next."}]},{"t":"p","runs":[{"text":"This is called "},{"text":"autoregressive","b":true},{"text":" generation, and everything below follows from it."}]},{"t":"h2","id":"it-re-reads-everything-every-time","runs":[{"text":"It re-reads everything, every time"}]},{"t":"p","runs":[{"text":"The model holds no state between tokens. To produce your reply’s fiftieth word it processes the entire conversation again, from the first hidden instruction to the forty-ninth word it just wrote."}]},{"t":"p","runs":[{"text":"(Providers cache intermediate results so this is faster than it sounds, but conceptually and for billing it is what happens.)"}]},{"t":"p","runs":[{"text":"Two consequences. A long conversation is more expensive per message than a short one, because you are re-sending everything each turn. And there is no memory anywhere except the text itself, which is why the previous module’s point about corrections vanishing is not a design oversight but the shape of the thing."}]},{"t":"h2","id":"it-cannot-plan-the-end-of-the-sentence","runs":[{"text":"It cannot plan the end of the sentence"}]},{"t":"p","runs":[{"text":"At the moment it emits a token, nothing has decided how the sentence finishes. Each choice is made from what came before."}]},{"t":"p","runs":[{"text":"Which raises a fair question: how does it write a coherent five-paragraph answer, then? Because the early tokens constrain the later ones so tightly. Having written “There are three reasons for this. First,” the text now overwhelmingly implies that a second and third will follow, and the model is very good at honouring what the text implies. Structure emerges from constraint rather than from a plan."}]},{"t":"p","runs":[{"text":"This also predicts a real failure. Ask for exactly seven items and you often get six or eight, because at no point does anything count. Ask for a poem where the last line must land a specific joke and it will frequently write towards a different landing, because the ending was never chosen in advance."}]},{"t":"h2","id":"the-most-useful-idea-in-this-lesson-it-commits","runs":[{"text":"The most useful idea in this lesson: it commits"}]},{"t":"p","runs":[{"text":"Once a token is emitted, it is part of the input. There is no backspace."}]},{"t":"p","runs":[{"text":"If the model begins an answer with a wrong number, every subsequent token is generated in a context where that number is established fact. The overwhelmingly likely continuation of a confident wrong claim is more confident wrong elaboration. You will watch it construct supporting detail around an error rather than reverse into it, and this looks like stubbornness or dishonesty. It is neither. It is the arithmetic of continuation."}]},{"t":"p","runs":[{"text":"Three practical moves follow directly:"}]},{"t":"ul","items":[[{"text":"When it goes wrong, do not argue with it. Edit or restart.","b":true},{"text":" Most interfaces let you edit your previous message and regenerate. That removes the bad text from the context entirely. Arguing leaves the error in place, where it keeps exerting influence."}],[{"text":"Ask for reasoning before the answer, never after.","b":true},{"text":" “Work through it, then give the total” puts the working in the context where it can influence the total. “Give the total, then explain” produces an explanation of a number already committed to, which is why such explanations so often justify a wrong answer fluently."}],[{"text":"Ask for options before a recommendation.","b":true},{"text":" Once it has recommended, it is arguing a case."}]]},{"t":"h2","id":"why-thinking-helps-at-all","runs":[{"text":"Why “thinking” helps at all"}]},{"t":"p","runs":[{"text":"Each token gets a fixed amount of computation. Hard questions do not get more than easy ones. The only way for a model to spend more effort on a problem is to produce more tokens before committing to the answer."}]},{"t":"p","runs":[{"text":"That is what chain-of-thought prompting does, and it is why “let us work through this step by step” measurably improves accuracy on multi-step problems. It is not that the model is encouraged to try harder. It is that the intermediate tokens are real working, held in the context, and the final answer is then predicted from working rather than from the question alone."}]},{"t":"p","runs":[{"text":"The reasoning models released from late 2024 onwards industrialise this: they are trained to generate a long private working-out before answering. Slower, dearer, and better at anything with steps in it. They have their own lesson later."}]}],"check":{"question":[{"text":"A model gives a wrong total, the user points out the error, and the model apologises and produces a detailed justification of the same wrong total. What does this reveal?"}],"options":[{"text":[{"text":"The model is optimised to defend its answers, because users rated confident responses more highly."}],"correct":false,"tempting":[{"text":"Invokes preference training, which does push towards confidence, but does not explain why the specific wrong figure persists in the context."}]},{"text":[{"text":"The model has cached the earlier calculation and is retrieving it rather than recomputing."}],"correct":false,"tempting":[{"text":"Assumes a stored result; nothing is cached as a value, and the figure persists because it is text in the context."}]},{"text":[{"text":"The wrong total is now part of the input text, so the likeliest continuation is elaboration consistent with it rather than a reversal."}],"correct":true,"tempting":null},{"text":[{"text":"The user’s correction was too polite, and a firmer instruction would trigger a recalculation."}],"correct":false,"tempting":[{"text":"Treats it as a phrasing problem; a firmer correction still leaves the wrong figure in the context exerting the same pull."}]}],"order":[3,2,1,0],"why":null},"prev":{"slug":"words-into-tokens","title":"Text is chopped up before the model sees it","minutes":9},"next":{"slug":"attention-what-it-does","title":"Attention, without a single equation","minutes":9}}}