Case & CodeA FIELD GUIDE TO AI
Start learning
Beginner

Context window

Also: context windows, long context, long-context

In plain words

How much text the model can hold in mind at once: your question, the documents you added, and the conversation so far. Anything outside it is invisible to the model.

A desk with limited space
Your questionThe 2 documents you addedThe conversation so far
On the desk: the model can read all of this right now
Your other 40 documentsLast week's conversationThe firm's file system
In the cabinet: the model cannot see any of this unless something puts it on the desk

The context window is the size of the desk. Bigger models have bigger desks, but every desk has an edge, and things near the edge get less attention.

The fuller definition

A context window is the amount of information a model can use within an interaction, usually measured in tokens. Instructions, supplied material, conversation, and output compete for capacity under model-specific rules.

Go deeper

One illustrative context budget
Instructions
2,000
Sources and history
8,000
Output reserve
4,000
Unused
2,000

A hypothetical 16,000-token budget. Real limits and token accounting depend on the model. Saving a file outside this budget does not mean it is present in the current context, and a passage inside it is not guaranteed equal attention.

A concrete example

A long transcript can consume space that might otherwise hold earlier conversation or a longer answer.

The distinction that matters

Fitting within a limit does not guarantee complete or equally reliable use of every passage.

Related terms

Where it is taught

What actually happens when you ask AI a question?

Source and further reading

Google · Machine Learning Glossary

The definition and example are written for this library. The link gives background, official documentation or legal authority as labelled. Legal scope depends on the jurisdiction and current text; product features depend on release and settings.

Lessons, terms, practical guides and sources ESC