1. Home
  2. Glossary
  3. Context window
AI glossary · Models & training

Context window

Context window: The context window is the maximum amount of text, measured in tokens, that a language model can consider at one time. It includes your prompt, any pasted documents, the conversation so far, and the model's reply.

Think of the context window as the model's working memory. Everything it knows about your specific request has to fit inside it: the instructions, the files you attached, every earlier turn of the conversation, and the answer it is writing. Nothing outside the window exists to the model.

Windows have grown a lot. Early chat models handled a few thousand tokens, roughly a short article. As of mid-2026, leading models accept hundreds of thousands of tokens, and some accept a million or more, enough for several books. Check the vendor's documentation, because limits differ by model and plan.

Bigger is not the same as perfect. When a conversation runs long, older messages may be trimmed or summarized, which is why an assistant sometimes forgets a rule you set an hour ago. Models can also pay less attention to material buried in the middle of a very long input. Put the most important instructions and facts near the start or the end, and restate them when a thread runs long.

Example at work

A consultant loads twelve client interview transcripts into a single chat and asks for common themes. The first few answers are sharp, but after twenty follow-up questions the model starts contradicting earlier findings. She starts a fresh chat, pastes her saved summary of the themes, and continues from there.

Why it matters

The context window sets the practical ceiling on what you can hand an AI tool in one go. Understanding it tells you when to split a task, when to start a new conversation, and why restating key instructions late in a long thread gets better results.

Related terms