Context window
Definition
The context window is the upper limit on input plus output tokens that a language model can process in one request.
In practice
Everything the model should use has to fit inside the window: instructions, conversation history, retrieved chunks and tool results. Because the model is stateless, the window is effectively its short-term memory, and applications must trim or summarise history and select only the most relevant passages as conversations and documents grow.
A bigger window is not free. Every input token adds prefill latency and cost on every call, and models attend less reliably to material buried in the middle of long contexts. That is why retrieval that sends a few relevant chunks usually beats stuffing whole documents in, even when they would fit.
Example
With a 128,000-token window, a RAG prompt of 1,000 instruction tokens plus 8 chunks of 500 tokens leaves ample room for the answer, while costing a fraction of sending the full 90,000-token manual.