Context Window
The maximum number of tokens a model can process in a single request (input + output).
The context window is the total token capacity a model can attend to at once. In 2026, frontier models support 200k–2M token windows — enough for entire codebases or hundreds of pages of documents in a single call.
Larger windows enable long-document reasoning and multi-file code understanding without retrieval. But they come with real costs: quadratic attention (in practice, tuned to be near-linear), higher per-query price, and the 'lost in the middle' phenomenon where facts placed mid-prompt are recalled less reliably.
For most enterprise workloads, targeted retrieval into an 8–32k window still wins on cost, latency and accuracy over stuffing large context. Long windows are a tool for specific escalations, not a default.
Key points
- Frontier windows in 2026: 200k–2M tokens
- Cost and latency scale with input tokens — big prompts get expensive fast
- 'Lost in the middle' — recall drops on facts placed mid-prompt
- Retrieval into a smaller window still wins economics for most workloads
Common use cases
Frequently asked
Related terms
A neural network trained on massive text corpora to understand and generate human-like language.
A pattern that grounds LLM answers in your private documents by retrieving relevant snippets at query time.
The practice of designing model inputs to produce reliable, task-specific outputs.
Applying Context Window in your business?
We help enterprises design, ship, and govern AI systems end-to-end.