# Context Window

> The most text, in tokens, a model can read at one time.

**Field:** Artificial Intelligence  
**Category:** LLMs  
**Also known as:** Context Length, Context Size

## Think of it like

Think of it like a desk. Only so many pages fit on it at once.

## Definition

The context window is the most text a language model can take in at one time. It is counted in tokens. It holds all of one request: the instructions, the chat so far, any pasted files and the answer being written. Sizes run from a few thousand tokens in small models to over a million in some large ones. Text that does not fit is cut off. The model cannot see it.

## Example

Jack pastes a 900-page book into a chat with a 200,000-token context window. The book is about 450,000 tokens, so the tool only takes in part of it.

## Why it matters

It sets how long a chat can run. It also sets how big a file you can hand over before the model starts to lose things.

## Common mistake

Thinking a bigger window means the model remembers you. Each chat starts empty, and the window only holds what is sent this time.

## Three principles

- **Counted in tokens.** Input and output together.
- **Thousands to millions.** Depends on the model.
- **Outside is unseen.** Cut text is simply gone.

## Related terms

- [Token (AI)](https://learn.benibix.com/term/ai/token)
- [Large Language Model (LLM)](https://learn.benibix.com/term/ai/large-language-model)
- [Parameter Count](https://learn.benibix.com/term/ai/parameter-count)
- [Knowledge Cutoff](https://learn.benibix.com/term/ai/knowledge-cutoff)
- [Context Engineering](https://learn.benibix.com/term/ai/context-engineering)
- [Retrieval-Augmented Generation (RAG)](https://learn.benibix.com/term/ai/retrieval-augmented-generation)
- [Auto-Compact](https://learn.benibix.com/term/ai/auto-compact)

## Told apart from

- [Context Window vs Knowledge Cutoff](https://learn.benibix.com/compare/context-window-vs-knowledge-cutoff): People often think a model with a big context window knows recent news. They are two different limits. The knowledge cutoff is the date its training text stops, so it is about what the model learned. The context window is how much text it can read right now, so it is about what you hand it. Pasting a fresh article into the window is how you get past the cutoff.
- [Context Window vs Max Tokens](https://learn.benibix.com/compare/context-window-vs-max-tokens): People think max tokens is the size of the context window, and it is not. The context window is all the text a model can hold at once: what you send and what it writes. Max tokens is a cap you set on the reply alone. The reply has to fit in what is left of the window after your prompt.
- [Agent Memory vs Context Window](https://learn.benibix.com/compare/agent-memory-vs-context-window): People often think an agent remembers all it ever saw in its context window. It does not. The context window is just what the model can see right now, and it is wiped when the task ends. Agent memory is kept outside the model and read back in later. If a fact was never saved, the next task will not know it.

## Taught in

- [The LLM Context Window](https://learn.benibix.com/learn/ai-llms/llm-context-window): LLMs, 4/15
- [Multi-Turn Conversations](https://learn.benibix.com/learn/ai-working-with-ai/multi-turn-conversations): Prompt Engineering, 2/16
- [Claude Code Sessions](https://learn.benibix.com/learn/ai-claude-code/claude-code-sessions): Claude Code, 2/16
- [Chat with Your Documents](https://learn.benibix.com/learn/ai-use-case/chat-with-your-documents): AI Assistants and Chatbots, 4/13
- [Context, Recap and Copy](https://learn.benibix.com/learn/ai-claude-code-commands/context-recap-and-copy): Claude Code Commands, 5/17

![A long row of tokens with a frame around the newest part. Tokens inside the frame are what the model can see. Older tokens to the left of the frame are greyed out.](https://learn.benibix.com/diagrams/llm-context-window.svg)

---

Source: https://learn.benibix.com/term/ai/context-window
Author: Behnia Zarei (a developer in Vienna, Austria, who builds and teaches data, AI and business intelligence at BENIBIX)
Publisher: BENIBIX Learn (https://learn.benibix.com/)
Last updated: 2026-11-18
Licence: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Quote freely with attribution.
