A context window is the total amount of text an AI model can "see" at one time when it produces a reply. It includes your instructions, the documents you paste in, the earlier turns of the conversation and the answer the model is writing. Long documents behave differently because everything competes for the same limited space, and a model does not pay equal attention to every part of it.
What goes into the context window
Think of the context window as the model's working desk. Only what is on the desk can be used for the current answer. A typical request puts several things on that desk:
- Your instructions, including any standing system instructions set by your team.
- The conversation so far, because the model does not remember earlier chats by itself; the history is sent again with each message.
- Attached or pasted material: contracts, reports, spreadsheets, meeting transcripts.
- The reply being written, which also takes up room.
Models measure this space in tokens, which are small chunks of text, not in pages or words. The exact size of a window differs between models and changes over time, so check the current figure for the model you use rather than relying on a number you read last year.
Why long documents behave differently
Even when a document fits inside the window, a longer input is not the same as a shorter one. Three things tend to happen.
- Attention is uneven. Models often handle details near the start and end of a long input more reliably than details buried in the middle. This is commonly described as "lost in the middle".
- Noise dilutes the signal. If only two paragraphs of a 60-page file matter, the other pages are distraction that the model must work around.
- Instructions drift. In a long conversation, an early instruction such as "answer in formal English" can be followed less consistently as more material piles up after it.
None of this means long inputs are bad. It means you should design for them, rather than assume the model weighs every sentence equally.
Practical tips for working with long material
Put the question where it will be noticed
State your task clearly, and consider repeating the key instruction after the document as well as before it. A short reminder at the end is cheap and often helps.
Send only what is relevant
Instead of pasting an entire policy manual, paste the sections that apply. If you do not know which sections apply, ask the model to first list the relevant ones, then work on those in a second step.
Label your material
When you supply several documents, give each a clear name and say what it is: "Document A is the signed contract; Document B is the draft amendment." Structure helps the model find and compare the right parts.
Ask for evidence
Ask the model to point to the passage that supports each claim. This makes it easier for you to verify the answer, and it nudges the model to ground itself in the text. It does not remove the need to check; see our guide to checking whether AI output is accurate.
Start fresh when a conversation gets long
If a thread has wandered through many topics, summarise the decisions so far, then start a new conversation with that summary. You keep the useful facts and drop the clutter.
Keep reusable material in a project
If the same reference documents are needed again and again, a structured workspace is easier to manage than re-pasting them. Our explainer on what a Claude Project is covers this.
Context window versus retrieval
When the full document set is far too big to place on the desk, teams often use retrieval: the system searches the collection and brings only the most relevant passages into the window for each question. That is the idea behind RAG, explained for business leaders. Retrieval is not automatically better; it adds moving parts and can miss the right passage. For a handful of documents, putting them directly in the window is simpler and often good enough.
Context windows and cost
More text in the window generally means more processing. For repeated work that reuses the same large block of instructions or reference material, techniques such as prompt caching can lower the cost of sending that block again. Prompt caching can reduce the cost of cached input by up to 90%, though the details depend on how your application is built.
A simple decision framework
- Small, specific task? Paste the relevant text and ask directly.
- One long document? Label it, state the question, ask for supporting passages and verify key points.
- Many documents, asked about repeatedly? Consider a project or a retrieval setup.
- Long, meandering chat? Summarise and restart.
Where this shows up in training
Managing context is a core skill for people building with Claude, and it is covered in the context management domain of the Claude Certified Architect study guide. Terms such as "token" and "context window" are also defined in the AI glossary. Agmo Studio, a Select Partner of the Anthropic Claude Partner Network, covers these ideas in its Claude Certified Architect workshop and in in-house training for teams that work with long documents every day.