A context window is the maximum amount of text, measured in tokens, that a language model can process at once in a conversation or query.
Key Points
- It is measured in tokens, not words, and a token can represent a whole word or just part of a longer word.
- Once the limit is reached, the model may lose track of information from the earlier part of the conversation or document.
- A larger context window allows the model to analyze long documents or extended conversations without losing continuity.
- Different models have different context windows, ranging from a few thousand to hundreds of thousands of tokens.
Practical Example
A model with a small context window may struggle to summarize a very long document accurately, while a model with a large context window can process the entire document in a single request.
Why It Matters
Context window size affects how much content a model can process from a page or a set of documents at once, which matters for long or technical content.
FAQ
Is one token equal to one word?
Not always; a token can be a whole word, part of a longer word, or a punctuation mark.
Does context window size affect AI Search?
Indirectly, yes — content that is clearly structured and logically divided is easier to process within context window limits.