AI WordsLanguage modelsBeginnerfor everyone

Context window, context length · context size

How much text an AI can read and keep in view at once, counted in tokens.

An AI doesn't store your chat in a memory the way you do. Every time it answers, it rereads everything: your messages, any pasted text and its own replies. The most it can take in at once is its context window, measured in tokens.

When the window fills up, older parts get pushed out or cut off, depending on the app. That's why an AI can seem to forget the start of a long chat. Windows have grown fast: about 100,000 tokens in 2023 and around a million in 2024.

Bigger isn't automatically better. One study found models more often miss details buried in the middle of a long input.

Think of it like this

Picture the whiteboard in class. When it's full, the teacher erases the oldest notes to make room. Anything erased is gone for a student who only looks at the board right now.

For example

After a very long chat, "What was my name again?" might fail if that message has slid out of the window.

Records about this

Source-checked moments from AI history.

Google DeepMind
Gemini 1.5 Pro

Context length jumped by an order of magnitude, sparking the RAG-is-dead debate

Nelson F. Liu et al. (Stanford, UC Berkeley, Samaya AI)
Lost in the Middle published

The first large-scale counterevidence to the assumption that you can simply put in a long context

Anthropic
Anthropic expands Claude's context window from 9K to 100K

The starting gun for the long-context race; made feeding in whole documents without RAG a real option