← All Terms

Context Window

The maximum amount of text, measured in tokens, a model can consider at once when generating a response, including your prompt, any retrieved documents, and its own reply.

Implementation

Every model has a limit on how much text it can hold in view at once, your instructions, background documents, and the conversation so far, all counted together in tokens. Once that limit is reached, older content gets dropped or truncated, and the model simply can’t see it anymore.

Vendors market ever-larger context windows as a straightforward upgrade, but bigger isn’t automatically better. Models are measurably worse at finding and using a fact buried in the middle of a very long context than one placed near the start or end, an effect sometimes called “lost in the middle.” Stuffing a huge document into the window is not the same as the model actually reasoning well over all of it.

The practical implication: a well-designed system that retrieves only the relevant few pages usually outperforms one that dumps everything into a massive context window and hopes the model finds what matters, and it costs less to run.