Context window
The amount of text, measured in tokens, that a language model can take into account in one request: the instructions, the conversation so far, any attached documents and the answer it is writing.
A context window is the working space a large language model sees in a single request. Everything the model can use for that answer has to fit inside it: the system instructions, the user's message, earlier turns of the conversation, retrieved documents, tool results and the output itself. It is counted in tokens, not pages.
Whatever falls outside the window does not exist for the model. It does not remember last week's conversation unless something puts that conversation back into the window.
Why it matters for decisions
Vendors compete on window size, and the number is easy to over-read. A model that accepts a very long input has not promised to use every part of it equally well. Research by Nelson Liu and colleagues, published in 2024, found that the models tested at the time answered best when the relevant passage sat near the start or the end of a long input, and noticeably worse when it was buried in the middle.
So "we can paste the whole contract archive in" is a design choice with two costs. Every token in the window is billed on every call, which shows up in inference bills even where caching discounts repeated input. And a crowded window can make answers less reliable rather than more. Selecting what goes in, often through retrieval, usually beats sending everything.
For agents that work across days, the window is also where stale assumptions pile up. That is the problem described as context debt.
Related terms
Token
The small chunk of text, roughly a word or part of a word, that language models read and write. Providers usually price and limit usage in tokens, but token cost is not the cost of a result.
LLM
Large language model: an AI model trained on very large amounts of text to predict and generate language, which can be used to answer, summarise, write, reason about and act on text.
RAG
Retrieval-augmented generation: a pattern where a model is given relevant documents or data retrieved at question time, so its answers rest on current, specific sources rather than only its training.
Context debt
The growing difficulty of knowing what a persistent AI agent currently believes, where that belief came from, and how to correct it, as the agent accumulates memory over time.