Explainer · Updated November 28, 2026 · 3 minute read
What is a context window?
The short answer
A context window is the maximum amount of text an AI model can take into account at one time, measured in tokens. It covers the instructions, the conversation so far, any attached files or search results, and the reply being written. Anything outside the window is invisible to the model unless it is supplied again.
What has to fit inside the window
A language model has no memory between requests. Each time you send a message, the app sends the model the whole conversation again, along with any hidden instructions from the product and any documents you attached. All of that, plus the answer the model writes, has to fit inside the context window.
The size is counted in tokens, the word fragments that models read. Early chat models could hold a few thousand tokens, which is several pages of text. As of this writing, many models hold hundreds of thousands of tokens or more, enough for a long book.
What happens when the window fills up
When a conversation grows past the limit, some of it has to be left out. Depending on the product, the app may drop the oldest messages, replace earlier parts of the chat with a summary, or stop and ask you to start a new conversation.
Memory features in chat apps work around the limit. They save notes or past conversations outside the model and insert the relevant pieces into the window when they are needed.
The limits of a large window
A large window lets a model work with long documents and long multi-step tasks. It does not guarantee that the model uses everything in it equally well. Models tend to recall material at the start and end of a long input better than material in the middle, and accuracy often drops as the window fills.
Size also costs time and money. The model has to process the full contents of the window on every request, so material the task does not need makes responses slower and more expensive. Supplying the relevant pages usually works better than supplying everything.
Common questions
Is the context window the same as memory?
No. The context window holds what the model can see during one request, while memory features store information elsewhere and copy it back into the window later.
How is a context window different from a token?
A token is a unit of text, usually a word or part of a word. The context window is the number of those units a model can handle at once.
Why does a chatbot forget what was said earlier?
The conversation has probably outgrown the context window, so the earliest messages were dropped or compressed into a summary. Starting a new chat and restating the important details usually fixes it.