A context window is the span of recent tokens a language model can read at once when it drafts its next tokens, setting a hard limit on how much instruction, history, and retrieved evidence fits in one pass.
How it works
Every model ships with a fixed maximum length, counted in tokens rather than words, that bounds the whole input it processes together. New tokens push older ones toward the edge, so long conversations and large documents must be trimmed, summarized, or paged into chunks to stay inside the limit. Larger windows hold more material but cost more memory and compute per request, which is why providers price long-context calls higher and teams pair them with retrieval that loads only the passages each question needs. Evals that measure recall across the full window keep teams honest about whether the model truly uses distant material or only the nearby lines.
Builders reach for context budgets whenever work must fit the window: shortest sufficient instructions, retrieved passages instead of whole archives, and summaries that carry forward what no longer fits.