Context window

The maximum amount of text, measured in tokens, that a model can take into account at once - your prompt and its answer together.

The context window is a hard limit on how much the model can see in a single call. It covers the system prompt, the conversation so far, any files you attached and the answer being generated. When you hit the limit, something has to be dropped, and in most chat interfaces the oldest turns go first.

Two practical consequences. First, a long conversation quietly loses its own beginning, which is why a session that started well drifts off task after an hour - the instructions that set it up are no longer in the window. Restating the important rules, or putting them in a system-prompt, fixes this. Second, cost and latency scale with how full the window is, so pasting an entire repository to ask about one function is expensive and usually worse than pasting the function.

A large window is not the same as good recall across it. Models retrieve reliably from the start and end of a long input and less reliably from the middle, so put what matters at the edges.

Where this comes up

Prompts, configs and tutorials in the library that touch this term.