{"course":{"slug":"ai-actually-explained","title":"AI, Actually Explained","url":"https://addaly.com/learn/ai-actually-explained","level":"beginner","track":"start"},"lesson":{"slug":"the-context-window","title":"The desk it works on, and what falls off it","url":"https://addaly.com/learn/ai-actually-explained/the-context-window","position":25,"of":92,"minutes":9,"answer":"The context window is a desk that everything competes for, the oldest items fall off silently, and material in the middle is attended to least reliably, so restate what matters late and start fresh threads.","keyIdea":"The context window is a desk that everything competes for, the oldest items fall off silently, and material in the middle is attended to least reliably, so restate what matters late and start fresh threads."},"body":{"format":"markdown","text":"## Everything the model can see\n\nThe **context window** is the total amount of text a model can consider at one moment, measured in tokens. It is not memory in any lasting sense. Think of it as a desk: whatever is on the desk can be used, and whatever is off it does not exist.\n\nEight things compete for that desk, and most people only know about the second:\n\n- the hidden system instructions from the product\n- your current message\n- every earlier message in this conversation, yours and its own\n- any files or images you attached\n- anything retrieved by a search on your behalf\n- any stored memories the product pasted in\n- descriptions of the tools it may call\n- the reply it is currently generating\n\nSizes as of 2026 run from about 8,000 tokens on small local models, through 128,000 on most mainstream ones, to a million or more on a few. For scale, 128,000 tokens is roughly 96,000 English words (a 300-page book) and considerably less than that in most other scripts.\n\n> Figure: Eight things competing for one desk. Layers, top to bottom: The hidden system prompt (Hundreds to thousands of words placed there by the product before you typed anything); Stored memories (Notes the product saved about you and pasted back in); Tool descriptions (What the model may call, and how); Attached files and images (A 1024-pixel photograph costs several hundred tokens); Retrieved search results (Page text a search fetched on your behalf); Every earlier turn (Yours and its own, back to the start of the thread); Your current message (The part most people think is the whole of it); The reply being generated (Each token it writes is read back before the next one is chosen). All of it is counted in the same token budget, and all of it is re-sent on every turn. Most people know about one item on this list. When the desk fills, the oldest turns are dropped silently, which is why a constraint set at the start quietly stops applying.\n\n## What happens when it fills\n\nThe model cannot simply be given more. So the product does something on your behalf, usually without saying so.\n\nMost commonly, the **oldest turns are dropped**. Sometimes the middle is replaced by an automatic summary. Sometimes only the last few exchanges are kept along with the system instructions.\n\nThis is the real explanation for a very familiar experience: a long conversation in which the assistant slowly forgets a constraint you set at the start, or starts contradicting a decision made an hour ago. Nothing degraded. The instruction fell off the desk.\n\nIt also explains why the assistant sometimes appears to forget the file you attached forty messages ago. The file is gone from the context; a summary of it, or nothing at all, remains.\n\n## A big window is not the same as reading it\n\nThe second thing to know is that capacity and attention are different claims.\n\nAs the previous lesson noted, models retrieve facts placed near the beginning or end of a long context far more reliably than facts placed in the middle. Newer models are better and the effect has not gone away.\n\nSo the honest expectation when you paste a hundred pages is: everything is available, the ends are attended to well, the middle is a lottery, and the model will not tell you which. It has no signal that says \"I did not really look at that part\". It answers with the same confidence either way.\n\n## The cost, which surprises people\n\nEach turn re-sends the whole context. If your conversation has grown to 80,000 tokens, every new message, however short, is processed against all 80,000.\n\nOn a paid interface that is what you are billed for. On a free one it is why replies get slower as a chat lengthens. And it is why a fresh conversation is dramatically faster and cheaper than a long one, for the same question.\n\n## Six practical habits\n\nAll of these come straight from the mechanism, and together they change results more than most prompt tricks.\n\n1. **Start a new conversation for a new task.** Continuing a two-hundred-message thread carries all its irrelevance forward, competing for attention with your actual question.\n2. **Restate the constraint that matters, late.** If the answer must be in Hindi, under 200 words, and cite the attached policy, say so in the message that asks for it, not only at the start.\n3. **Paste the relevant passage rather than the whole document** when you can. Ten targeted paragraphs beat a hundred pages for accuracy, cost and speed.\n4. **Ask about one section at a time.** Then combine the answers yourself.\n5. **Check whether the file is still in play.** Ask it to quote the first line of the attachment. If it cannot, the attachment is gone and everything it says about the document is invention.\n6. **Keep your own record.** The context is not storage. If a decision matters, it belongs in a document you control, not in a chat that will be trimmed.\n\n## The one-sentence version\n\nA context window is working space, not memory; it is shared with things you did not put there; the middle of it is read least reliably; and you pay for all of it on every turn."},"check":{"question":"Ninety messages into a conversation, an assistant starts ignoring a formatting rule set in message two. Which explanation fits the mechanism best?","options":[{"text":"The model has developed a preference for its own default format over the course of the conversation.","correct":false,"tempting":"Attributes a drifting preference to the model; nothing in it accumulates preferences across a conversation."},{"text":"The early messages have been trimmed or summarised to fit the context, so the rule is no longer on the desk.","correct":true},{"text":"The provider silently switched to a cheaper model partway through the conversation.","correct":false,"tempting":"Routing between models does happen, but it would not selectively affect one instruction from early in the thread."},{"text":"Formatting rules apply only to the message that follows them and must be repeated each turn by design.","correct":false,"tempting":"States a rule that is not true; instructions do persist while they remain in the context."}]},"prev":{"slug":"embeddings-meaning-as-position","title":"Meaning as a position in space","url":"https://addaly.com/learn/ai-actually-explained/embeddings-meaning-as-position"},"next":{"slug":"why-answers-differ","title":"Why the same question gives different answers","url":"https://addaly.com/learn/ai-actually-explained/why-answers-differ"},"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) 'The desk it works on, and what falls off it', in AI, Actually Explained. Edited by M. Mun. Addaly. Available at: https://addaly.com/learn/ai-actually-explained/the-context-window (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":"The desk it works on, and what falls off it","courseTitle":"AI, Actually Explained","module":{"index":3,"slug":"how-a-chatbot-works","title":"What a chatbot is actually doing"},"answer":null,"keyIdea":"The context window is a desk that everything competes for, the oldest items fall off silently, and material in the middle is attended to least reliably, so restate what matters late and start fresh threads.","hero":{"kind":"figure","figure":{"t":"figure","label":"Figure","figure":{"type":"stack","title":"Eight things competing for one desk","layers":[{"label":"The hidden system prompt","detail":"Hundreds to thousands of words placed there by the product before you typed anything"},{"label":"Stored memories","detail":"Notes the product saved about you and pasted back in"},{"label":"Tool descriptions","detail":"What the model may call, and how"},{"label":"Attached files and images","detail":"A 1024-pixel photograph costs several hundred tokens"},{"label":"Retrieved search results","detail":"Page text a search fetched on your behalf"},{"label":"Every earlier turn","detail":"Yours and its own, back to the start of the thread"},{"label":"Your current message","detail":"The part most people think is the whole of it"},{"label":"The reply being generated","detail":"Each token it writes is read back before the next one is chosen"}],"caption":"All of it is counted in the same token budget, and all of it is re-sent on every turn. Most people know about one item on this list. When the desk fills, the oldest turns are dropped silently, which is why a constraint set at the start quietly stops applying."},"alt":"Figure: Eight things competing for one desk. Layers, top to bottom: The hidden system prompt (Hundreds to thousands of words placed there by the product before you typed anything); Stored memories (Notes the product saved about you and pasted back in); Tool descriptions (What the model may call, and how); Attached files and images (A 1024-pixel photograph costs several hundred tokens); Retrieved search results (Page text a search fetched on your behalf); Every earlier turn (Yours and its own, back to the start of the thread); Your current message (The part most people think is the whole of it); The reply being generated (Each token it writes is read back before the next one is chosen). All of it is counted in the same token budget, and all of it is re-sent on every turn. Most people know about one item on this list. When the desk fills, the oldest turns are dropped silently, which is why a constraint set at the start quietly stops applying."}},"blocks":[{"t":"h2","id":"everything-the-model-can-see","runs":[{"text":"Everything the model can see"}]},{"t":"p","runs":[{"text":"The "},{"text":"context window","b":true},{"text":" is the total amount of text a model can consider at one moment, measured in tokens. It is not memory in any lasting sense. Think of it as a desk: whatever is on the desk can be used, and whatever is off it does not exist."}]},{"t":"p","runs":[{"text":"Eight things compete for that desk, and most people only know about the second:"}]},{"t":"ul","items":[[{"text":"the hidden system instructions from the product"}],[{"text":"your current message"}],[{"text":"every earlier message in this conversation, yours and its own"}],[{"text":"any files or images you attached"}],[{"text":"anything retrieved by a search on your behalf"}],[{"text":"any stored memories the product pasted in"}],[{"text":"descriptions of the tools it may call"}],[{"text":"the reply it is currently generating"}]]},{"t":"p","runs":[{"text":"Sizes as of 2026 run from about 8,000 tokens on small local models, through 128,000 on most mainstream ones, to a million or more on a few. For scale, 128,000 tokens is roughly 96,000 English words (a 300-page book) and considerably less than that in most other scripts."}]},{"t":"h2","id":"what-happens-when-it-fills","runs":[{"text":"What happens when it fills"}]},{"t":"p","runs":[{"text":"The model cannot simply be given more. So the product does something on your behalf, usually without saying so."}]},{"t":"p","runs":[{"text":"Most commonly, the "},{"text":"oldest turns are dropped","b":true},{"text":". Sometimes the middle is replaced by an automatic summary. Sometimes only the last few exchanges are kept along with the system instructions."}]},{"t":"p","runs":[{"text":"This is the real explanation for a very familiar experience: a long conversation in which the assistant slowly forgets a constraint you set at the start, or starts contradicting a decision made an hour ago. Nothing degraded. The instruction fell off the desk."}]},{"t":"p","runs":[{"text":"It also explains why the assistant sometimes appears to forget the file you attached forty messages ago. The file is gone from the context; a summary of it, or nothing at all, remains."}]},{"t":"h2","id":"a-big-window-is-not-the-same-as-reading-it","runs":[{"text":"A big window is not the same as reading it"}]},{"t":"p","runs":[{"text":"The second thing to know is that capacity and attention are different claims."}]},{"t":"p","runs":[{"text":"As the previous lesson noted, models retrieve facts placed near the beginning or end of a long context far more reliably than facts placed in the middle. Newer models are better and the effect has not gone away."}]},{"t":"p","runs":[{"text":"So the honest expectation when you paste a hundred pages is: everything is available, the ends are attended to well, the middle is a lottery, and the model will not tell you which. It has no signal that says “I did not really look at that part”. It answers with the same confidence either way."}]},{"t":"h2","id":"the-cost-which-surprises-people","runs":[{"text":"The cost, which surprises people"}]},{"t":"p","runs":[{"text":"Each turn re-sends the whole context. If your conversation has grown to 80,000 tokens, every new message, however short, is processed against all 80,000."}]},{"t":"p","runs":[{"text":"On a paid interface that is what you are billed for. On a free one it is why replies get slower as a chat lengthens. And it is why a fresh conversation is dramatically faster and cheaper than a long one, for the same question."}]},{"t":"h2","id":"six-practical-habits","runs":[{"text":"Six practical habits"}]},{"t":"p","runs":[{"text":"All of these come straight from the mechanism, and together they change results more than most prompt tricks."}]},{"t":"ol","start":1,"items":[[{"text":"Start a new conversation for a new task.","b":true},{"text":" Continuing a two-hundred-message thread carries all its irrelevance forward, competing for attention with your actual question."}],[{"text":"Restate the constraint that matters, late.","b":true},{"text":" If the answer must be in Hindi, under 200 words, and cite the attached policy, say so in the message that asks for it, not only at the start."}],[{"text":"Paste the relevant passage rather than the whole document","b":true},{"text":" when you can. Ten targeted paragraphs beat a hundred pages for accuracy, cost and speed."}],[{"text":"Ask about one section at a time.","b":true},{"text":" Then combine the answers yourself."}],[{"text":"Check whether the file is still in play.","b":true},{"text":" Ask it to quote the first line of the attachment. If it cannot, the attachment is gone and everything it says about the document is invention."}],[{"text":"Keep your own record.","b":true},{"text":" The context is not storage. If a decision matters, it belongs in a document you control, not in a chat that will be trimmed."}]]},{"t":"h2","id":"the-one-sentence-version","runs":[{"text":"The one-sentence version"}]},{"t":"p","runs":[{"text":"A context window is working space, not memory; it is shared with things you did not put there; the middle of it is read least reliably; and you pay for all of it on every turn."}]}],"check":{"question":[{"text":"Ninety messages into a conversation, an assistant starts ignoring a formatting rule set in message two. Which explanation fits the mechanism best?"}],"options":[{"text":[{"text":"The model has developed a preference for its own default format over the course of the conversation."}],"correct":false,"tempting":[{"text":"Attributes a drifting preference to the model; nothing in it accumulates preferences across a conversation."}]},{"text":[{"text":"The early messages have been trimmed or summarised to fit the context, so the rule is no longer on the desk."}],"correct":true,"tempting":null},{"text":[{"text":"The provider silently switched to a cheaper model partway through the conversation."}],"correct":false,"tempting":[{"text":"Routing between models does happen, but it would not selectively affect one instruction from early in the thread."}]},{"text":[{"text":"Formatting rules apply only to the message that follows them and must be repeated each turn by design."}],"correct":false,"tempting":[{"text":"States a rule that is not true; instructions do persist while they remain in the context."}]}],"order":[2,3,0,1],"why":null},"prev":{"slug":"embeddings-meaning-as-position","title":"Meaning as a position in space","minutes":10},"next":{"slug":"why-answers-differ","title":"Why the same question gives different answers","minutes":8}}}