Context window

A context window is the fixed number of tokens a model can read and write in a single request, its temporary working memory.

Category

Industry concept

See all terms

What is a context window?

A context window is the maximum number of tokens a model can process in one request. The system prompt, the conversation so far, and any retrieved documents all have to fit inside that limit, and the window is thrown away and rebuilt from scratch on the next request.

A model's training data is fixed once training ends, so the context window is the only place new information can reach it at the moment it answers.

How does a context window differ from a context layer?

A context window resets on every request. Whatever fits inside it is gone by the next call, so the model has no way to remember what it saw unless something outside the window puts it back in. A context layer is the opposite: it lives outside any single request, holds one structured, versioned, permission-aware copy of company knowledge, and stays there across every call an agent makes.

Size does not close this gap. Even a window large enough to hold a million tokens still favors information near the start or end of the prompt over information buried in the middle, so cramming more in does not guarantee the model uses all of it. A context layer avoids the problem instead of trying to out-scale it: it keeps knowledge organized so only the relevant part needs to enter the window at all.

How does a context window work?

Transformer models use self-attention, where every token compares itself against every other token in the window to decide what matters. That comparison grows quadratically with length, so doubling the window roughly quadruples the compute and memory needed to process it, which is why context windows have a hard ceiling even on the largest models available today.

Position inside the window matters as much as size: models answer better when a fact sits near the start or end of the prompt and worse when it sits in the middle, so a bigger window does not by itself mean better answers. Qontext's context agents narrow this down before the request happens, surfacing the relevant slice of the context repository so what lands in the window is already the part that matters, not the whole repository at once.

FAQ

How big is a context window?

Does a bigger context window mean better answers?

What happens when a conversation exceeds the context window?

Is a context window the same as memory?

Why not just make context windows unlimited?

Make your company AI-native.