AI & LLMs
Context window
The context window is the maximum amount of text (measured in tokens) a language model can consider at once, including your prompt and its own reply.
The context window is the model's working memory for a single request, measured in tokens. Everything the model reads and writes in that turn - system instructions, your prompt, retrieved documents, and the generated answer - must fit inside it.
A bigger window lets you pass more context (longer documents, more retrieved passages) but usually costs more and can dilute the model's focus. RAG exists partly to fit only the most relevant content into a limited window.
Related terms
Last reviewed 2026-07-09