AIExplainer
AI Basics Large Language Models Intermediate 2 min read

What is a Context Window?

The maximum amount of text a language model can consider at one time, measured in tokens.

Pronunciation: /ˈkɒntekst ˈwɪndəʊ/

The context window is the amount of text an AI model can "see" at once — including your prompt, any retrieved documents, and the model's response. It is measured in tokens.\n\nA larger context window means the model can work with longer documents, maintain longer conversations, and consider more information when generating a response.

The context window is like a desk surface. A small desk (small context window) means you can only spread out a few pages at a time. A large desk lets you lay out an entire book while you work.

Claude can process a 200,000-token context window — enough to analyse an entire novel or a large codebase in a single conversation.

Context window size is a key specification when choosing a model. Applications processing long documents, legal contracts, or extended conversations need models with larger context windows.

A large context window does not mean the model uses all of it equally well. Models may pay more attention to recent text and miss details in the middle of very long inputs.

Early models had context windows of 2,048 tokens. GPT-4 Turbo expanded to 128K. Modern models continue pushing toward million-token contexts.

Token limit