AI term

What is Context window?

The maximum amount of text (in tokens) a model can consider at once, including your prompt and its response. Larger windows handle longer documents.

The context window is the total amount of text, measured in tokens, that a model can work with in a single request. It covers everything: your instructions, any documents you paste in, the conversation history, and the response the model generates. If the total exceeds the limit, something has to be cut, which is why long chats can "forget" earlier details. Window sizes vary widely, from a few thousand tokens in older models to 200,000 or even a million in newer ones. A bigger window is not automatically better. Processing more input costs more, adds latency, and models can still miss details buried in the middle of very long contexts. For workloads bigger than any window, techniques like RAG retrieve only the relevant pieces instead of loading everything.

Example

A model with a 200,000-token window can take in a 300-page novel plus your question in one request. A model with an 8,000-token window would need the book split into many chunks.

Why it matters

If you work with long documents, codebases, or extended conversations, the context window is often the first spec to check when picking a model. Browse the AI tools directory or the model leaderboard to put it into practice.

Related AI terms

All 36 →