Context window
The fixed number of tokens a model can attend to on one request, shared between the system prompt, tools, retrieved documents, history and the answer itself.
It behaves as a budget with competing claimants rather than as headroom, because irrelevant tokens are not inert: position within the window and the presence of near-miss retrieved passages both change the answer. Input also crowds out output space, which is why long prompts produce truncated structured responses.
Explained in depth
Deciding what enters the context window and what stays out: budgeting the prompt, compaction, tool-result handling, and retrieval precision over recall.
Context Window EconomicsContext is a per-request budget, not a capability. Attention cost scaling, long-context price tiers, prompt caching, and why chat history compounds.
Prompt engineeringWhat is actually established about prompting, how to spot folklore, why prompt changes need evaluation, and where prompting stops and retrieval begins.