Context Window
The maximum amount of text an AI model can consider at once during a conversation or task.
Definition
The context window is the total amount of text—measured in tokens—that a large language model can process in a single interaction. This includes both the input (your prompt and any documents) and the output (the model's response).
Context windows have grown dramatically, from a few thousand tokens to over 100,000 tokens in current models, enabling processing of entire books or codebases.
Why It Matters
Context window size determines what's possible with AI. Larger windows allow analyzing complete documents, maintaining longer conversations with full history, and understanding complex multi-part problems.
However, larger contexts use more computational resources and money, so understanding context limits helps optimize cost and performance.
Examples in Practice
A 4,000 token context window can hold roughly 3,000 words—enough for a detailed prompt but not a full research paper.
An analyst loads a 50-page contract into a 128K context window, asking the AI to identify specific clauses across the entire document.
A developer realizes their prompt is being truncated and summarizes earlier conversation history to fit within the model's context limits.