Skip to content

Term · Checked November 4, 2026

Context window

How much text a model can consider at once, measured in tokens.

Source: xAI documentation

AI basics

Why it matters

The context window is the model's working memory for one conversation or task. Everything you send, everything it has said back and any documents you attach have to fit inside it; past that, older parts fall out or the request is refused.

A bigger window lets a model read a long contract, a codebase or a book in one go. Companies quote it in tokens, so a window of a million tokens is roughly several novels' worth of text, though cost and speed usually grow with how much of it you use.

Related terms