{"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":"A context limit does not guarantee that every uploaded or earlier item is included or used well. Products may trim, summarise or retrieve material; keep your own records, supply relevant context and verify important outputs.","keyIdea":"A context limit does not guarantee that every uploaded or earlier item is included or used well. Products may trim, summarise or retrieve material; keep your own records, supply relevant context and verify important outputs."},"body":{"format":"markdown","text":"## Everything the model can see\n\nThe **context window** limits the amount of input and generated material a model can handle in a request, using model-specific token or representation rules. The desk analogy helps: only supplied material is directly available in that context. It is not the same as learned knowledge in the weights or durable storage maintained by the product.\n\nDepending on the application, these eight kinds of material can share that working space:\n\n- instructions supplied by the product\n- your current message\n- selected earlier conversation, possibly summarised\n- text or representations from attached files and images\n- retrieved search results\n- saved memories that the product selects and includes\n- descriptions of tools available for this request\n- the reply being generated, subject to the model’s input and output limits\n\nFor scale, token budgets can be in the thousands, hundreds of thousands or more, depending on the exact model and version. A hypothetical limit of 128,000 tokens might correspond roughly to 96,000 words of ordinary English under the earlier rule of thumb, but the actual count varies. Check the documented input limit, output limit and tokenizer rather than inferring capacity from page count.\n\n> Figure: Eight things competing for one desk. Layers, top to bottom: The hidden system prompt (Product-supplied instructions; length and role depend on the application.); Stored memories (Saved records selected and included by the product, if it supports this.); Tool descriptions (The tools offered for this request and how to invoke them.); Attached files and images (Included text or image representations; token accounting depends on the model and input settings.); Retrieved search results (Selected passages with source identifiers where the product supplies them.); Selected earlier conversation (Selected earlier messages or summaries, rather than necessarily the entire history.); Your current message (Your request and any relevant material you include with it.); The reply being generated (Generated tokens, within the model’s applicable input and output limits.). Depending on the product and model, selected material from these categories can share a request’s context budget. Not every item is always present, and earlier material may be summarised, retrieved or omitted. Inclusion does not guarantee correct use; billing and cache rules are separate.\n\n## What happens when it fills\n\nWhen a request would exceed a model’s limits, the application must handle that condition. It might reject the request, shorten material or select a different subset. Do not assume that everything you uploaded is included just because the interface accepted the upload.\n\nPossible strategies include dropping earlier turns, producing summaries or retrieving relevant pieces on demand. Different products make different choices, and the interface may or may not show them. Keep important information somewhere more durable than the current chat context.\n\nA forgotten rule can result from trimming or summarisation, but it can also happen while the rule is still present. Instruction following and use of long inputs are imperfect. A changing answer does not by itself prove that the instruction was removed.\n\nIt also explains why the assistant sometimes appears to forget the file you attached forty messages ago. The file may be gone from the context, with a summary of it, or nothing at all, in its place. Or it may still be there and simply be used badly, as the next section explains.\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\nThe Lost in the Middle study found position-sensitive performance on selected retrieval and question-answering tasks. It is a warning to evaluate how a particular model uses your documents, not evidence that every current model always reads the ends best.\n\nWhen supplying a hundred pages, check what the application actually passed to the model and then test the material answers. A fluent response is not a trace of which parts were used. A model can miss or misinterpret relevant text even when it is within the window.\n\n## The cost, which surprises people\n\nA new turn may include substantial earlier context, selected by the application. Processing a long input can require more resources than processing a short one, but caching, summarisation, retrieval and model architecture affect the actual work.\n\nMany text-generation APIs charge separately for input and output tokens, and may distinguish cached input. Other products use subscriptions or different limits. A fresh, focused conversation can reduce unnecessary context, but faster or cheaper is not guaranteed: check the service’s rules and measure the workflow.\n\n## Six practical habits\n\nThese habits can make a workflow easier to inspect. Test them on your task rather than assuming that any prompt habit guarantees accuracy.\n\n1. **Use a focused conversation for a new task.** Check which earlier decisions still matter rather than carrying irrelevant history indefinitely.\n2. **State the important constraint with the request.** If the answer must be in Hindi, under 200 words and based on a policy, make those requirements explicit and check the result.\n3. **Supply the relevant passage when possible.** This can reduce irrelevant material, but include enough surrounding context to preserve its meaning.\n4. **Break a large review into manageable sections.** Check the relationships between sections when combining the answers.\n5. **Check access to the attachment.** Requesting an exact quotation can reveal a problem, but a failed quote does not prove absence and one successful quote does not prove the whole file was used.\n6. **Keep your own record.** Store material decisions and sources in a document you control, rather than relying on what the next chat turn will contain.\n\n## The one-sentence version\n\nA context window is limited working space. The application chooses what enters it; capacity is not reliable comprehension, and storage, computation and billing follow separate rules."},"check":{"question":"Ninety messages into a conversation, an assistant ignores an early formatting rule. Which is a plausible context-related explanation that should be investigated?","options":[{"text":"The model has developed a preference for its own default format over the course of the conversation.","correct":false,"tempting":"Changing behaviour in one conversation does not establish a newly trained persistent preference. In-context adaptation and product state can affect responses; the observation alone does not identify their roles."},{"text":"The early message may have been trimmed or summarised, or the model may have failed to follow it despite its presence. Check the available context and restate the rule.","correct":true},{"text":"The provider silently switched to a cheaper model partway through the conversation.","correct":false,"tempting":"A model or product change is another possibility, but this observation alone does not establish it or rule it out."},{"text":"Formatting rules apply only to the message that follows them and must be repeated each turn by design.","correct":false,"tempting":"There is no universal one-turn expiry rule. Whether an instruction remains available and is followed depends on the application and model."}]},"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. Source and assessment review continues. 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: 29 November 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":"A context limit does not guarantee that every uploaded or earlier item is included or used well. Products may trim, summarise or retrieve material; keep your own records, supply relevant context and verify important outputs.","hero":{"kind":"figure","figure":{"t":"figure","label":"Figure","figure":{"type":"stack","title":"Eight things competing for one desk","caption":"Depending on the product and model, selected material from these categories can share a request’s context budget. Not every item is always present, and earlier material may be summarised, retrieved or omitted. Inclusion does not guarantee correct use; billing and cache rules are separate.","layers":[{"label":"The hidden system prompt","detail":"Product-supplied instructions; length and role depend on the application."},{"label":"Stored memories","detail":"Saved records selected and included by the product, if it supports this."},{"label":"Tool descriptions","detail":"The tools offered for this request and how to invoke them."},{"label":"Attached files and images","detail":"Included text or image representations; token accounting depends on the model and input settings."},{"label":"Retrieved search results","detail":"Selected passages with source identifiers where the product supplies them."},{"label":"Selected earlier conversation","detail":"Selected earlier messages or summaries, rather than necessarily the entire history."},{"label":"Your current message","detail":"Your request and any relevant material you include with it."},{"label":"The reply being generated","detail":"Generated tokens, within the model’s applicable input and output limits."}]},"alt":"Figure: Eight things competing for one desk. Layers, top to bottom: The hidden system prompt (Product-supplied instructions; length and role depend on the application.); Stored memories (Saved records selected and included by the product, if it supports this.); Tool descriptions (The tools offered for this request and how to invoke them.); Attached files and images (Included text or image representations; token accounting depends on the model and input settings.); Retrieved search results (Selected passages with source identifiers where the product supplies them.); Selected earlier conversation (Selected earlier messages or summaries, rather than necessarily the entire history.); Your current message (Your request and any relevant material you include with it.); The reply being generated (Generated tokens, within the model’s applicable input and output limits.). Depending on the product and model, selected material from these categories can share a request’s context budget. Not every item is always present, and earlier material may be summarised, retrieved or omitted. Inclusion does not guarantee correct use; billing and cache rules are separate."}},"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":" limits the amount of input and generated material a model can handle in a request, using model-specific token or representation rules. The desk analogy helps: only supplied material is directly available in that context. It is not the same as learned knowledge in the weights or durable storage maintained by the product."}]},{"t":"p","runs":[{"text":"Depending on the application, these eight kinds of material can share that working space:"}]},{"t":"ul","items":[[{"text":"instructions supplied by the product"}],[{"text":"your current message"}],[{"text":"selected earlier conversation, possibly summarised"}],[{"text":"text or representations from attached files and images"}],[{"text":"retrieved search results"}],[{"text":"saved memories that the product selects and includes"}],[{"text":"descriptions of tools available for this request"}],[{"text":"the reply being generated, subject to the model’s input and output limits"}]]},{"t":"p","runs":[{"text":"For scale, token budgets can be in the thousands, hundreds of thousands or more, depending on the exact model and version. A hypothetical limit of 128,000 tokens might correspond roughly to 96,000 words of ordinary English under the earlier rule of thumb, but the actual count varies. Check the documented input limit, output limit and tokenizer rather than inferring capacity from page count."}]},{"t":"h2","id":"what-happens-when-it-fills","runs":[{"text":"What happens when it fills"}]},{"t":"p","runs":[{"text":"When a request would exceed a model’s limits, the application must handle that condition. It might reject the request, shorten material or select a different subset. Do not assume that everything you uploaded is included just because the interface accepted the upload."}]},{"t":"p","runs":[{"text":"Possible strategies include dropping earlier turns, producing summaries or retrieving relevant pieces on demand. Different products make different choices, and the interface may or may not show them. Keep important information somewhere more durable than the current chat context."}]},{"t":"p","runs":[{"text":"A forgotten rule can result from trimming or summarisation, but it can also happen while the rule is still present. Instruction following and use of long inputs are imperfect. A changing answer does not by itself prove that the instruction was removed."}]},{"t":"p","runs":[{"text":"It also explains why the assistant sometimes appears to forget the file you attached forty messages ago. The file may be gone from the context, with a summary of it, or nothing at all, in its place. Or it may still be there and simply be used badly, as the next section explains."}]},{"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":"The Lost in the Middle study found position-sensitive performance on selected retrieval and question-answering tasks. It is a warning to evaluate how a particular model uses your documents, not evidence that every current model always reads the ends best."}]},{"t":"p","runs":[{"text":"When supplying a hundred pages, check what the application actually passed to the model and then test the material answers. A fluent response is not a trace of which parts were used. A model can miss or misinterpret relevant text even when it is within the window."}]},{"t":"h2","id":"the-cost-which-surprises-people","runs":[{"text":"The cost, which surprises people"}]},{"t":"p","runs":[{"text":"A new turn may include substantial earlier context, selected by the application. Processing a long input can require more resources than processing a short one, but caching, summarisation, retrieval and model architecture affect the actual work."}]},{"t":"p","runs":[{"text":"Many text-generation APIs charge separately for input and output tokens, and may distinguish cached input. Other products use subscriptions or different limits. A fresh, focused conversation can reduce unnecessary context, but faster or cheaper is not guaranteed: check the service’s rules and measure the workflow."}]},{"t":"h2","id":"six-practical-habits","runs":[{"text":"Six practical habits"}]},{"t":"p","runs":[{"text":"These habits can make a workflow easier to inspect. Test them on your task rather than assuming that any prompt habit guarantees accuracy."}]},{"t":"ol","start":1,"items":[[{"text":"Use a focused conversation for a new task.","b":true},{"text":" Check which earlier decisions still matter rather than carrying irrelevant history indefinitely."}],[{"text":"State the important constraint with the request.","b":true},{"text":" If the answer must be in Hindi, under 200 words and based on a policy, make those requirements explicit and check the result."}],[{"text":"Supply the relevant passage when possible.","b":true},{"text":" This can reduce irrelevant material, but include enough surrounding context to preserve its meaning."}],[{"text":"Break a large review into manageable sections.","b":true},{"text":" Check the relationships between sections when combining the answers."}],[{"text":"Check access to the attachment.","b":true},{"text":" Requesting an exact quotation can reveal a problem, but a failed quote does not prove absence and one successful quote does not prove the whole file was used."}],[{"text":"Keep your own record.","b":true},{"text":" Store material decisions and sources in a document you control, rather than relying on what the next chat turn will contain."}]]},{"t":"h2","id":"the-one-sentence-version","runs":[{"text":"The one-sentence version"}]},{"t":"p","runs":[{"text":"A context window is limited working space. The application chooses what enters it; capacity is not reliable comprehension, and storage, computation and billing follow separate rules."}]}],"check":{"question":[{"text":"Ninety messages into a conversation, an assistant ignores an early formatting rule. Which is a plausible context-related explanation that should be investigated?"}],"options":[{"text":[{"text":"The model has developed a preference for its own default format over the course of the conversation."}],"correct":false,"tempting":[{"text":"Changing behaviour in one conversation does not establish a newly trained persistent preference. In-context adaptation and product state can affect responses; the observation alone does not identify their roles."}]},{"text":[{"text":"The early message may have been trimmed or summarised, or the model may have failed to follow it despite its presence. Check the available context and restate the rule."}],"correct":true,"tempting":null},{"text":[{"text":"The provider silently switched to a cheaper model partway through the conversation."}],"correct":false,"tempting":[{"text":"A model or product change is another possibility, but this observation alone does not establish it or rule it out."}]},{"text":[{"text":"Formatting rules apply only to the message that follows them and must be repeated each turn by design."}],"correct":false,"tempting":[{"text":"There is no universal one-turn expiry rule. Whether an instruction remains available and is followed depends on the application and model."}]}],"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}}}