The context window is the maximum amount of text - measured in tokens - that a language model can process at once within a single request.
Everything sent to the model within a conversation or request – the system prompt, prior conversation history, attached documents, and the current user question – must together fit inside this context window.
Modern models offer context windows of several hundred thousand tokens in some cases, allowing entire books or large codebases to be processed in a single request.
If the context window is exceeded, older content must be dropped or summarized – and an overly large context window can also reduce answer quality if relevant information gets "lost" amid very long, irrelevant text (known as the "lost in the middle" effect).


