A document can fit within a model’s advertised context size and still leave too little room for the requested answer. The window is not simply a file-upload allowance. The rest of the request also occupies space.
Anthropic’s context-window documentation describes input and output components, including conversation history, instructions, tool information, and generated output. Details and limits vary by model and interface, so use the documentation for the system you actually deploy rather than transferring one product’s numbers to another.
Budget the whole exchange
Imagine a deliberately simplified capacity of 20,000 tokens. If instructions, history, and documents use 18,500, a request for a 4,000-token answer does not fit within that example’s shared limit. These numbers are illustrative, not specifications for a named model.
Use the provider’s token-counting facilities where available. Character counts and page counts are rough proxies because tokenisation and document processing vary. Images, extracted text, and tool results may contribute in ways that are not obvious from the visible prompt.
For a document workflow, decide which passages are needed for the current question. Keep source identifiers when selecting excerpts so the answer can still point back to the relevant material. Removing irrelevant history can help, but deleting definitions or constraints can change the task.
Test the expected longest input and answer together. Record what happens near the limit: rejection, truncation, summarisation, or another interface-specific behaviour. Do not assume that content remains available merely because it appeared earlier in a chat.
A larger window is useful capacity, not proof that every detail will be used correctly. Check answer quality separately from whether the request technically fits. Token budgeting and evidence checking solve different parts of the application.

