Context Window
What is Context Window?
In one sentence: The context window is the maximum amount of text, measured in tokens, that a model can look at in one go.
Think of it as the model's desk. Everything it needs, your question, the conversation, and any documents, must fit on the desk. If there is too much, older parts fall off or must be removed. Some models have small desks of a few thousand tokens; others can hold over a million.
Σ Quick math / rule of thumb: 128K tokens ≈ ~96,000 English words (~300 book pages); 1M tokens ≈ ~750,000 words (~7–8 full novels).
What does Context Window look like?
A model with a 200,000-token context window can read roughly a 500-page book at once.
Why does Context Window matter?
The context window limits how much you can give the model and how long a conversation can go before it forgets.
Context Window vs. Agent Memory
The context window is temporary working RAM for the current conversation turn, whereas agent memory persists facts, preferences, and past episodes across sessions in external storage.
| Dimension | Context Window | Agent Memory |
|---|---|---|
| Lifespan | Cleared when you start a new chat | Persists across days, sessions, and tasks |
| Capacity | Bounded (e.g., 128K–1M tokens) and billed per turn | Practically unlimited in a database or files |
| Human analogy | What you hold in short-term attention right now | Your notebook and long-term memory |
Last updated · Fact-checked by The AI Math
Linking to this page from a lesson or article? <a href="https://getaimath.com/dictionary/context-window/">Context Window, explained simply</a> (The AI Math Dictionary)