Context Window
The maximum amount of text a model can consider at once, measured in tokens.
The context window is the model's working memory for a single request — the prompt, retrieved documents and conversation history must all fit inside it. Larger windows allow more grounding data but cost more per call.
Context Window in practice
Context windows matter when designing assistants that work over long documents or conversations. Rather than sending everything, well-built systems retrieve only the most relevant passages, summarise older conversation turns and keep instructions concise — which improves accuracy as well as cost, because models can overlook details buried in very long inputs.
Guides that cover this
Related terms
- Token
- The unit of text models process — roughly three-quarters of a word in English.
- LLM (Large Language Model)
- A model trained on large volumes of text that predicts and generates language.
- RAG (Retrieval-Augmented Generation)
- Grounding a model's answers in your own documents retrieved at query time.
- Prompt Engineering
- Systematically designing, testing and versioning the instructions given to a model.
- Embedding
- A numeric representation of text that captures its meaning for search and comparison.