A token is roughly three-quarters of an English word, and window sizes have grown from 4,096 tokens in early GPT-3 to 128,000 in GPT-4-class models and a million or more in Gemini-class models. The growth is real and useful, but the window is shared space: verbose tool output, a long system prompt and retrieved passages all draw from the same budget.
A larger window is not the same as a better answer. Models attend unevenly to long contexts — content in the middle is recalled measurably worse than content at the beginning or end, the "lost in the middle" effect documented in 2023 and still visible in practice. Cost and latency also scale with input length, so stuffing an entire knowledge base into the window is slower and more expensive than retrieving the three passages that matter.
Production systems therefore treat context as a budget to be managed. The system prompt and tool schemas are reserved first, retrieval injects only ranked passages, conversation history is summarised once it ages, and tool results are truncated or compacted before being returned to the model. Multi-step agents fill windows faster than chat does, because every action adds an observation, and context exhaustion mid-task is one of the commonest agent failures.
Eviction strategy deserves as much design attention as inclusion. A sliding window over raw history preserves recency but forgets commitments made earlier in the conversation. Periodic summarisation by a smaller model compresses history at the cost of losing exact wording. Retrieval over past turns brings back what is relevant to the current question and nothing else. Most production systems combine all three, and token counts are tracked before every call rather than discovered from an API error after one.
A growing share of agent design is deciding what should not live in the window at all. Long-term facts belong in an external memory store, large documents in a retrieval index, and bulky tool output behind a reference the model can page through on demand. The window is for what the model must reason over right now; treating it as storage is how systems become slow, expensive and unreliable simultaneously, and the fix is architectural rather than a bigger model.
Codazz builds this in production — LLM Integration.