Skip to content
NakodaAI

AI EncyclopediaCore concepts

Context Window

Also known as token limit

The maximum amount of text (measured in tokens) a model can 'see' at once - the prior conversation, a document, an instruction - when generating its next output.

context windowtokenstokenization

In plain English

Think of it as the model's working memory for a single conversation. Anything inside the context window, it can refer back to directly; anything outside it is gone unless it gets fed back in, summarised or retrieved again.

Technical explanation

A token is the smallest unit an LLM's tokenizer processes - roughly four characters or 0.75 words in English, and it can be a character, part of a word, a whole word or a short phrase. The context window is the maximum tokenized input (and, for most models, output) available to the model at one time; it is bounded by the architecture's attention mechanism and training regime, and different model families set it very differently.

Why it matters

Context window size determines what a model can practically do in one pass - summarise a 10-page contract versus a 400-page one, hold a short chat versus an all-day working session, or read an entire codebase at once. It is one of the most-quoted specifications when comparing models and directly shapes what a RAG or agent system needs to manage itself.

Real-world example

As of late 2026, Claude Sonnet 4.6 and Claude Haiku 4.5 both run a 200K-token context window, with Claude Opus 4.6 offering a one-million-token context in beta; Gemini 3.1 Pro Preview supports over one million input tokens; comparisons of this kind change roughly every few months as vendors ship new models.

Common misunderstanding

That a bigger context window means the model reasons equally well about everything inside it. In practice, models can lose reliability on information placed in the middle of a very long context ('lost in the middle') even when it is technically within the window.

Something wrong here?

Every entry is hand-researched and hand-written by Nakoda. If a fact is stale, a source has changed or a definition needs sharpening, tell us and we will check it.