Stockertim Dictionary · Artificial intelligence
Context window
Also called context length, context limit
In short
The context window is the maximum amount of text, measured in tokens, that a language model can take into account at once, including instructions, pasted material and its own replies.
- Beginner
- Concept
- Checked
In detail
Every time a language model produces a reply, it looks at a span of text: the system prompt, the conversation so far, any documents pasted in and the reply it is writing. That span has a ceiling, the context window, counted in tokens. Anything beyond the ceiling is simply not seen, so in a long conversation the earliest messages may drop out or be summarised by the surrounding software.
A larger window lets the model handle longer documents in one go, but size alone does not ensure good use of the material. Models can pay less attention to details buried in the middle of a very long input, and the more text supplied, the more chance that irrelevant passages distract from the task. Clear instructions placed at the start or the end, and only the material the task needs, usually work better than pasting everything.
The window also covers the output. If a prompt fills most of the window, little room is left for the answer, and replies may be cut short. Planning the token budget, splitting long sources into parts, or using retrieval to supply only the relevant passages are the usual ways to work within the limit.
Worked example
Lagoon Logistics wants to review a 30,000-word contract with a model whose context window is 32,000 tokens, at about 4 tokens for every 3 words.
- Contract size: 30,000 x 4 / 3 = 40,000 tokens
- Shortfall against the window: 40,000 - 32,000 = 8,000 tokens
- Split into two halves: 40,000 / 2 = 20,000 tokens each
The contract does not fit whole, so it is reviewed in two parts of about 20,000 tokens, leaving room for instructions and replies.
In practice
Staff check whether a document fits before pasting it, start a fresh conversation when a long chat drifts, and ask the assistant to work section by section on long reports. Designers of AI systems decide what goes into the window on every request.
Watch out
- The window is a limit on what the model sees at once, not a memory that keeps everything between sessions.
- A bigger window does not mean every detail inside it is used equally well.
Learn it properly
Official sources
- Artificial Intelligence Risk Management Framework: Generative Artificial Intelligence Profile · National Institute of Standards and Technology
- AI and cyber security: what you need to know · National Cyber Security Centre
Facts last checked on 3 November 2026.
Education, not advice: the Stockertim Dictionary explains what terms mean. It never recommends buying or selling anything.