Context Window
The context window is how much text an AI can 'hold in mind' at once.
Definition
The context window is the maximum amount of text (measured in tokens) a model can see in one request at once โ your messages, any uploaded files, the conversation so far, and the response, all combined.
A useful picture
Imagine a desk. No matter how smart you are, you can only work with what's on the desk right now. Everything in the filing cabinet next to it stays invisible unless you put it on the desk too. The context window is the size of that desk.
Why it matters
If a conversation or a file is too long, it won't all fit. Older messages or parts of the file get pushed out or need to be summarized. The AI effectively "forgets" them โ not because it's careless, but because there's no room left.
Practical tip
In long chats or large codebases, it helps to share only the relevant snippets instead of everything at once. Some agents automatically summarize older parts ("compaction") to free up space.
EXAMPLE
A model with a 200,000-token context window can hold roughly a medium-sized book in view at once.
QUICK QUIZ
What happens when a conversation exceeds the context window?
SOURCES
- Anthropic docs: Context windows โ docs.anthropic.com
- OpenAI docs: Text generation โ platform.openai.com
- Wikipedia: Large language model โ en.wikipedia.org