{"course":{"slug":"ai-at-work","title":"AI at Work","url":"https://addaly.com/learn/ai-at-work","level":"beginner","track":"work"},"lesson":{"slug":"the-context-window","title":"The context window, and why a long chat gets worse","url":"https://addaly.com/learn/ai-at-work/the-context-window","position":3,"of":73,"minutes":9,"answer":"Every turn resends the entire conversation, so instructions given early can be truncated away, attention is weakest in the middle, and cost grows with the square of the chat's length.","keyIdea":"Every turn resends the entire conversation, so instructions given early can be truncated away, attention is weakest in the middle, and cost grows with the square of the chat's length, which is why one task should mean one conversation."},"body":{"format":"markdown","text":"## Everything it knows, every time\n\nWhen you send your fortieth message in a conversation, the model does not remember the previous thirty-nine. It is handed all of them again, as one long block of text, and reads the lot from scratch before writing a word.\n\nThat block is the **context window**, and it holds everything: the product's hidden instructions, any documents you attached, every message you have sent, every reply it has given, and your latest question. The window has a fixed size, counted in tokens. Nothing outside it exists.\n\nAlmost every confusing behaviour in a long chat comes from this one fact.\n\n## The size, in things you recognise\n\nCommon limits today run from about 128,000 tokens to a million, with 200,000 fairly typical for a paid business tier. Converting to work you would recognise:\n\n- A page of ordinary prose: roughly 500 tokens.\n- A 40-page report: roughly 20,000.\n- A 300-page contract bundle: roughly 150,000, already over a 128,000 limit on its own.\n- An hour of transcribed meeting: 8,000 to 12,000.\n\nSo a 128,000-token window will hold a substantial document and a long discussion of it, and will not hold your document library. A million-token window will hold a great deal, and costs proportionally more to use.\n\n> Figure: What fits inside a 128,000-token window. Bars (tokens): One page of ordinary prose 500; An hour of transcribed meeting 10000; A 40-page report 20000; The window itself 128000; A 300-page contract bundle 150000. The contract bundle is over the limit before you have asked anything. Everything here is resent on every turn, so a fifty-page attachment is paid for again on message forty.\n\n## What happens when it fills\n\nProducts handle overflow in one of three ways, and which one yours uses changes what you should do.\n\nSome **refuse**, with an error saying the conversation is too long. This is the honest failure and the easiest to work with.\n\nSome **truncate silently**, dropping the oldest messages to make room. This produces the experience everybody has had: you gave a careful instruction at the start (\"always keep the client's name out of this\") and twenty messages later it stops obeying. It did not forget. The instruction is no longer in front of it, and there is nothing left that knows it ever existed.\n\nSome **summarise** the older part of the conversation and keep the summary. Better than dropping, and still lossy in exactly the way summaries are lossy: the specific number you mentioned in passing is the first thing to go.\n\n## The middle is the weak part\n\nEven inside the window, attention is not even. Across models, material at the very beginning and the very end of a long context is retrieved far more reliably than material in the middle. A fact planted 60 per cent of the way through a long document is measurably more likely to be missed than the same fact at either end.\n\nTwo practical consequences. Put the instruction that matters most at the **end** of your message, immediately before you ask for the output, not buried at the top of a long brief. And when you are working from a long document, ask located questions (\"in section 7, what is the notice period\") rather than one question of the whole file. The full treatment of this is later in the course; the mechanism is here.\n\n## The cost curve nobody warns you about\n\nYou are billed for every token going in, on every turn. Because the whole transcript is resent each time, the input cost of a conversation grows with the square of its length.\n\nWork it through. A chat where each turn adds 500 tokens costs 500 input tokens on turn one, 1,000 on turn two, and 20,000 on turn forty. The forty-turn conversation has consumed around 400,000 input tokens in total, not 20,000. Attach a 50-page document at the start and every single turn afterwards re-reads all 25,000 tokens of it.\n\nAt a representative business rate of a few dollars per million input tokens, a single long working session over a large document is cents rather than dollars, but a team of thirty doing it daily is a real line on a bill, and it is why \"why is our usage so high, nobody is doing anything unusual\" has a boring answer. Prompt caching, offered by most providers, cuts the cost of the repeated part substantially and is worth asking your administrator about.\n\n## Four habits that follow\n\n1. **One conversation per task.** When you move to a different job, start a new chat. You are not being wasteful; you are removing thousands of tokens of irrelevant history that are both costing money and competing for attention.\n2. **Restate the constraint late.** If it has drifted, do not scold it. Repeat the requirement in your next message, where it will be at the end of the window and most visible.\n3. **Attach once.** Pasting the same document three times in one conversation triples its cost and gives the model three copies to confuse.\n4. **When it goes strange, start again.** A conversation that has begun contradicting itself is usually one where the early material has been dropped or summarised away. Ten minutes of arguing with it will not recover the missing text. A fresh chat with a clean brief will.\n\nThe free path is the same one: run a local model with a small window and you can watch the truncation happen in a few minutes rather than inferring it from a bad afternoon."},"check":{"question":"At the start of a long chat you instructed the tool never to name the client. Thirty messages later it names the client. What is the most likely mechanism?","options":[{"text":"Model quality degrades over a session as the same weights are reused repeatedly.","correct":false,"tempting":"Imagines fatigue in a stateless system; the weights are identical on turn one and turn thirty, only the text supplied has changed."},{"text":"The model decided the instruction no longer applied because the topic had changed.","correct":false,"tempting":"Attributes an intention to a system that has no continuous state between turns; there was no decision, only text that was or was not present."},{"text":"Safety filters override user instructions after a certain conversation length.","correct":false,"tempting":"Invents a mechanism; nothing in these products relaxes a user's formatting or confidentiality instruction as a function of turn count."},{"text":"The early messages were dropped or summarised to keep the transcript inside the context window, so the instruction is no longer in front of the model at all.","correct":true}]},"prev":{"slug":"what-it-is-doing-when-it-answers","title":"What it is actually doing when it answers you","url":"https://addaly.com/learn/ai-at-work/what-it-is-doing-when-it-answers"},"next":{"slug":"the-task-audit","title":"The task audit","url":"https://addaly.com/learn/ai-at-work/the-task-audit"},"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 context window, and why a long chat gets worse', in AI at Work. Edited by M. Mun. Addaly. Available at: https://addaly.com/learn/ai-at-work/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 context window, and why a long chat gets worse","courseTitle":"AI at Work","module":{"index":1,"slug":"deciding-what-to-hand-over","title":"Deciding what to hand over"},"answer":null,"keyIdea":"Every turn resends the entire conversation, so instructions given early can be truncated away, attention is weakest in the middle, and cost grows with the square of the chat’s length, which is why one task should mean one conversation.","hero":{"kind":"figure","figure":{"t":"figure","label":"Figure","figure":{"caption":"The contract bundle is over the limit before you have asked anything. Everything here is resent on every turn, so a fifty-page attachment is paid for again on message forty.","series":[{"label":"One page of ordinary prose","value":500},{"label":"An hour of transcribed meeting","value":10000},{"label":"A 40-page report","value":20000},{"highlight":true,"label":"The window itself","value":128000},{"label":"A 300-page contract bundle","value":150000}],"title":"What fits inside a 128,000-token window","type":"bars","unit":"tokens"},"alt":"Figure: What fits inside a 128,000-token window. Bars (tokens): One page of ordinary prose 500; An hour of transcribed meeting 10000; A 40-page report 20000; The window itself 128000; A 300-page contract bundle 150000. The contract bundle is over the limit before you have asked anything. Everything here is resent on every turn, so a fifty-page attachment is paid for again on message forty."}},"blocks":[{"t":"h2","id":"everything-it-knows-every-time","runs":[{"text":"Everything it knows, every time"}]},{"t":"p","runs":[{"text":"When you send your fortieth message in a conversation, the model does not remember the previous thirty-nine. It is handed all of them again, as one long block of text, and reads the lot from scratch before writing a word."}]},{"t":"p","runs":[{"text":"That block is the "},{"text":"context window","b":true},{"text":", and it holds everything: the product’s hidden instructions, any documents you attached, every message you have sent, every reply it has given, and your latest question. The window has a fixed size, counted in tokens. Nothing outside it exists."}]},{"t":"p","runs":[{"text":"Almost every confusing behaviour in a long chat comes from this one fact."}]},{"t":"h2","id":"the-size-in-things-you-recognise","runs":[{"text":"The size, in things you recognise"}]},{"t":"p","runs":[{"text":"Common limits today run from about 128,000 tokens to a million, with 200,000 fairly typical for a paid business tier. Converting to work you would recognise:"}]},{"t":"ul","items":[[{"text":"A page of ordinary prose: roughly 500 tokens."}],[{"text":"A 40-page report: roughly 20,000."}],[{"text":"A 300-page contract bundle: roughly 150,000, already over a 128,000 limit on its own."}],[{"text":"An hour of transcribed meeting: 8,000 to 12,000."}]]},{"t":"p","runs":[{"text":"So a 128,000-token window will hold a substantial document and a long discussion of it, and will not hold your document library. A million-token window will hold a great deal, and costs proportionally more to use."}]},{"t":"h2","id":"what-happens-when-it-fills","runs":[{"text":"What happens when it fills"}]},{"t":"p","runs":[{"text":"Products handle overflow in one of three ways, and which one yours uses changes what you should do."}]},{"t":"p","runs":[{"text":"Some "},{"text":"refuse","b":true},{"text":", with an error saying the conversation is too long. This is the honest failure and the easiest to work with."}]},{"t":"p","runs":[{"text":"Some "},{"text":"truncate silently","b":true},{"text":", dropping the oldest messages to make room. This produces the experience everybody has had: you gave a careful instruction at the start (“always keep the client’s name out of this”) and twenty messages later it stops obeying. It did not forget. The instruction is no longer in front of it, and there is nothing left that knows it ever existed."}]},{"t":"p","runs":[{"text":"Some "},{"text":"summarise","b":true},{"text":" the older part of the conversation and keep the summary. Better than dropping, and still lossy in exactly the way summaries are lossy: the specific number you mentioned in passing is the first thing to go."}]},{"t":"h2","id":"the-middle-is-the-weak-part","runs":[{"text":"The middle is the weak part"}]},{"t":"p","runs":[{"text":"Even inside the window, attention is not even. Across models, material at the very beginning and the very end of a long context is retrieved far more reliably than material in the middle. A fact planted 60 per cent of the way through a long document is measurably more likely to be missed than the same fact at either end."}]},{"t":"p","runs":[{"text":"Two practical consequences. Put the instruction that matters most at the "},{"text":"end","b":true},{"text":" of your message, immediately before you ask for the output, not buried at the top of a long brief. And when you are working from a long document, ask located questions (“in section 7, what is the notice period”) rather than one question of the whole file. The full treatment of this is later in the course; the mechanism is here."}]},{"t":"h2","id":"the-cost-curve-nobody-warns-you-about","runs":[{"text":"The cost curve nobody warns you about"}]},{"t":"p","runs":[{"text":"You are billed for every token going in, on every turn. Because the whole transcript is resent each time, the input cost of a conversation grows with the square of its length."}]},{"t":"p","runs":[{"text":"Work it through. A chat where each turn adds 500 tokens costs 500 input tokens on turn one, 1,000 on turn two, and 20,000 on turn forty. The forty-turn conversation has consumed around 400,000 input tokens in total, not 20,000. Attach a 50-page document at the start and every single turn afterwards re-reads all 25,000 tokens of it."}]},{"t":"p","runs":[{"text":"At a representative business rate of a few dollars per million input tokens, a single long working session over a large document is cents rather than dollars, but a team of thirty doing it daily is a real line on a bill, and it is why “why is our usage so high, nobody is doing anything unusual” has a boring answer. Prompt caching, offered by most providers, cuts the cost of the repeated part substantially and is worth asking your administrator about."}]},{"t":"h2","id":"four-habits-that-follow","runs":[{"text":"Four habits that follow"}]},{"t":"ol","start":1,"items":[[{"text":"One conversation per task.","b":true},{"text":" When you move to a different job, start a new chat. You are not being wasteful; you are removing thousands of tokens of irrelevant history that are both costing money and competing for attention."}],[{"text":"Restate the constraint late.","b":true},{"text":" If it has drifted, do not scold it. Repeat the requirement in your next message, where it will be at the end of the window and most visible."}],[{"text":"Attach once.","b":true},{"text":" Pasting the same document three times in one conversation triples its cost and gives the model three copies to confuse."}],[{"text":"When it goes strange, start again.","b":true},{"text":" A conversation that has begun contradicting itself is usually one where the early material has been dropped or summarised away. Ten minutes of arguing with it will not recover the missing text. A fresh chat with a clean brief will."}]]},{"t":"p","runs":[{"text":"The free path is the same one: run a local model with a small window and you can watch the truncation happen in a few minutes rather than inferring it from a bad afternoon."}]}],"check":{"question":[{"text":"At the start of a long chat you instructed the tool never to name the client. Thirty messages later it names the client. What is the most likely mechanism?"}],"options":[{"text":[{"text":"Model quality degrades over a session as the same weights are reused repeatedly."}],"correct":false,"tempting":[{"text":"Imagines fatigue in a stateless system; the weights are identical on turn one and turn thirty, only the text supplied has changed."}]},{"text":[{"text":"The model decided the instruction no longer applied because the topic had changed."}],"correct":false,"tempting":[{"text":"Attributes an intention to a system that has no continuous state between turns; there was no decision, only text that was or was not present."}]},{"text":[{"text":"Safety filters override user instructions after a certain conversation length."}],"correct":false,"tempting":[{"text":"Invents a mechanism; nothing in these products relaxes a user’s formatting or confidentiality instruction as a function of turn count."}]},{"text":[{"text":"The early messages were dropped or summarised to keep the transcript inside the context window, so the instruction is no longer in front of the model at all."}],"correct":true,"tempting":null}],"order":[2,0,3,1],"why":null},"prev":{"slug":"what-it-is-doing-when-it-answers","title":"What it is actually doing when it answers you","minutes":10},"next":{"slug":"the-task-audit","title":"The task audit","minutes":9}}}