What is a context window? Explained with a clerk's desk
A context window is how much text an AI model can look at in one go: your instructions, documents, the chat so far and its own reply. Explained with a clerk working at a desk of fixed size.
- Author
Umair Mateen- Published
- Reading time
- 5 min
- Category
- AI
Meituan's LongCat-2.5, now generally available for coding agents, was announced with a one-million-token context window, a term that now appears in most AI model launches.
In one sentence: a context window is the amount of text an AI model can look at in one go, including your instructions, any documents, the conversation so far and its own reply; anything outside it, the model simply cannot see.
The everyday picture
Picture a clerk who works at a desk. You hand them papers: a question, some instructions, maybe a long report. They read only what is on the desk. Papers in the filing room do not exist for them.
The desk has a fixed size. The clerk's own reply is written on the same desk, so it takes space too. When the desk is full, something has to go. An old page is set aside, or several pages are swapped for one short summary note.
The AI model is the clerk. The desk is the context window.
Your papers go on the desk, the clerk reads them and writes a reply on the same desk. When the desk is full, older papers are set aside or shrunk into a summary note.
How it works, step by step
- Your request (the papers you hand over). Everything you send goes on the desk: the question, background instructions, attached files and the earlier messages in the chat. Anthropic's documentation lists all of these as counting towards the window.
- Tokens (how desk space is measured). Space is counted in tokens, small pieces of text. OpenAI's rule of thumb is that one token is about three quarters of an English word. Google says one million tokens is roughly eight average-length novels or about 50,000 lines of code.
- The model reads (the clerk looks over the desk). Each time it answers, the model works from what is in the window. This is separate from what it learned in training: Anthropic calls the window the model's "working memory".
- The reply (written on the same desk). The answer the model writes also counts towards the limit. A very long request leaves less room for a long answer.
- A full window (clearing the desk). If a request is simply too big, the service rejects it. In long chats, apps often drop the oldest messages or replace them with a short summary so the conversation can carry on.
Where the picture stops
- Desk space is not measured in pages. Tokens vary with the language and the kind of text. The same page in another language, or full of code, can take up more or less space.
- The clerk forgets the desk when the job ends. A real clerk remembers yesterday's papers. A model keeps nothing from the window after it answers. In a chat, the app usually sends the earlier messages again each time, which is why they count.
- A bigger desk does not mean closer reading. Anthropic notes that as the amount of text grows, the model's accuracy at recalling details can drop. Google reports that finding one fact in a huge input works well, but finding many facts at once is harder.
Why it matters for your business
- Cost. AI services usually charge by the token, and everything on the desk is counted on every request. Sending a 300-page manual with each question costs far more than sending the two pages that matter. Some providers offer cheaper rates for text that is sent again, through caching, but it still takes up room in the window.
- Quality. Choosing what goes on the desk matters as much as the desk's size. Clear instructions and only the relevant documents usually give better answers than everything at once.
- Fewer surprises. When an AI assistant "forgets" what you said early in a long chat, a full window is often the reason.
- What fits. Large windows let a model read a whole contract, a long report or a big part of a codebase in one request, without cutting it into pieces first.
An example
Imagine a 12-person property management firm that uses an AI assistant to answer tenant questions. At first, staff paste every lease, policy and old email thread into each chat. Replies are slow, the monthly bill grows, and some answers miss details buried in the middle.
They change the setup. The assistant now gets the firm's short house rules plus only the one lease that matters for each question. Answers become faster and more precise, and the cost per question falls, because the desk holds only what the clerk needs.
Frequently asked questions
Is a context window the same as an AI's memory?
Not quite. It is short-term working space for one request. What the model learned in training is separate, and some apps add their own memory features that save notes and put them back into the window later.
How big is a context window?
It depends on the model. Many current models from major providers offer around one million tokens, while others offer less. Check the provider's documentation for the exact figure.
Why does a chatbot forget what I said earlier?
In a long conversation, the window can fill up. The app may then drop or summarise older messages, so details from early on are no longer in front of the model.
Is a bigger context window always better?
No. It lets you send more, but more text costs more, can be slower and can make details easier to miss. Sending only what is relevant usually works best.
Related explainers
- What is an LLM? Explained with a new hire who read the whole library
- What is RAG? Explained with an open-book exam
- What is an AI agent? Explained with an assistant you send on errands
- What is caching? Explained with a restaurant kitchen
The DevDrift builds AI assistants that work from the right documents, with approvals and audit trails: see how.