A context window is the model-imposed ceiling on the number of tokens a single inference call can carry. The model works with the tokens currently in that window; information in databases, APIs, or other external storage must be brought into the call before it can inform the response. The window is temporary and changes between calls. section 1.1.1 section 7.1
The window is a hard limit, but filling it is not the objective. A system typically sets a smaller token budget to manage cost and latency. It must also account for an attention budget: extra content can dilute the influence of important instructions and evidence. Too little context can produce vague or unsupported answers; too much can add noise and processing time. section 1.1.1 section 7.1
Context management combines four techniques to keep each call useful within these limits:
- Selection chooses relevant information for the active prompt. section 7.1
- Writing persists recoverable state outside the window. section 7.1
- Compression condenses verbose history while retaining task-relevant details. section 7.1 section 12.1.6
- Isolation divides complex tasks across separate context windows. section 7.1
Figure 7.1 Context is managed through four complementary techniques: selection chooses relevant tokens for the active prompt, writing persists state to external storage, compression condenses verbose history, and isolation divides complex tasks across separate context windows
The figure places the four techniques in a context-management pipeline, including what stays active and what moves to external storage or separate windows. section 7.1
A return eligibility decision
A support agent considers a return requested 40 days after purchase. Its full policy document and ticket history exceed the budget, so it retrieves the 30-day rule and premium-plan exception, then compresses the ticket history. The summary must preserve the purchase date and plan tier: dropping the tier can cause the agent to deny a return allowed by the exception. section 12.1.6
Placement matters as well as inclusion. In long prompts, information in the middle can have less influence than information near the beginning or end. Ordering and emphasis help keep critical facts and instructions salient; caching stable context can also avoid recomputing it on every request. section 1.3.2





































