Fundamentals

AI context windows, explained.

The context window is the most misunderstood number in AI. Here's what it actually is, why "bigger" stopped being the answer, and how real systems work around its limits.

Published 2026-07-12·~7 min read·VeelIQ
Definition

The context window is the maximum amount of text — measured in tokens — that a language model can attend to in a single request: system instructions, conversation history, retrieved documents, tool results, and the response being generated, all counted together.

Everything a model "knows" during a conversation is either baked into its weights at training time or present in the window right now. There is no third place. That single fact explains most of the practical behavior people find surprising: why chatbots forget, why long conversations drift, and why pasting a 200-page PDF doesn't work as well as expected.

Tokens, not pages

Windows are measured in tokens — subword units averaging roughly ¾ of an English word. A 128K-token window is on the order of 300 pages; a 1M-token window, several novels. Sounds infinite. It isn't, for three reasons.

Why bigger windows didn't end the problem

1. Attention degrades over long inputs

Models attend unevenly across very long contexts. Information buried mid-window is recalled less reliably than information near the start or end — the well-documented "lost in the middle" effect. Stuffing the window trades retrieval precision for the illusion of completeness: the fact is technically in context and practically invisible.

2. Cost and latency scale with input

You pay per token, per request. Carrying 400K tokens of "maybe relevant" material on every turn multiplies cost and slows responses — for context the model mostly ignores. Efficient systems send the relevant few thousand tokens, not the available few hundred thousand.

3. The window still resets

This is the limit no window size fixes: when the session ends, the window empties. A 10M-token window that resets is still amnesia — just roomier. Persistence requires a store outside the window entirely.

The working-memory model

The productive mental model comes from computing's memory hierarchy: the context window is RAM, not disk.

Nobody solves RAM limits by buying enough RAM to hold their whole hard drive. You page in what you need. Retrieval and memory are exactly that paging mechanism for AI — which is why they matter more, not less, as windows grow: the bigger the window, the more tempting the anti-pattern of filling it.

Practical implications

For everyday AI use

For agents and automation

How the pieces fit

A well-engineered session composes its window per request: standing instructions (small), recalled memories relevant to the question (smaller), retrieved chunks from the corpus (targeted), and the live conversation. That composition discipline is context engineering — and services like VeelIQ Context exist to make the store-and-retrieve side of it automatic: the assistant calls recall and search_knowledge over MCP and pages in precisely what the moment needs.

Key takeaways

Related reading

Give your window a disk.

Memory and retrieval behind one MCP URL. Free Beta plan.

Try Context free