Esc

Context window

The most text, counted in tokens, that a model can consider at once. Your prompt and its answer share that space.

The context window caps how much the model sees in one call. The system prompt, the conversation so far, attached files and the answer being written all count against it. Hit the cap and something gets dropped. In most chat apps the oldest turns go first.

That has two consequences you will notice. A long session loses its own beginning, which is why a chat that started well wanders off task after an hour: the setup instructions have fallen out of the window. Repeat the rules that matter, or move them into a system-prompt. Cost and delay also grow with how full the window is, so pasting a whole repository to ask about one function is slow, pricey and usually gives a worse answer than pasting the function.

A big window does not mean good recall across all of it. Models pull facts out of the start and the end of a long input more reliably than out of the middle. Put the important material at the edges.

Where this comes up

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