# What Is a Context Window in AI? Limits and Evidence

URL: https://blog.brandregard.com/glossary/what-is-a-context-window-in-ai
Published: 2026-12-04
Updated: 2026-12-04
Facts checked: 2026-11-28

A context window is the cap on how much text an AI model can work with for a single task. OpenAI's API guide measures that cap in tokens per request, and Anthropic's documentation says the model's own reply counts toward it.

## What is a token, and why does it matter?

Google's explainer from February 2024 says a token can be a fragment of a word, or a piece of an image or video. So the window counts pieces, and the same content can take different numbers of them in different languages.

In a 2023 preprint, Ahia and colleagues measured the Flores dataset with tokenizers of popular language models, and Latin-script languages needed substantially fewer tokens than languages in other scripts.

The same preprint describes ChatGPT, an older system, as limited to 4,096 tokens in May 2023, shared by prompt and output. Under that limit, the preprint says Telugu and Amharic struggled to fit a single in-context example for most of the XLSUM test set.

## Is a context window the same as memory?

Stanford HAI's glossary uses short-term memory as an analogy, and says a model starts to "forget" earlier replies once a chat outgrows the window.

In our view, the memory analogy is a useful starting picture, judged by whether it still shows readers what they control.

For example, imagine a long chat in which you paste a contract, then ask about its opening clause after many follow-up questions. If the chat no longer fits, the early text may be cut or the request may be refused, depending on the tool.

## What happens when the window is full?

The answer depends on the tool and the model. Anthropic's documentation, as read on 28 November 2026, says an API request whose input alone is too long gets a 400 invalid_request_error.

For Claude 4.5 models and newer, Anthropic's documentation says a request is accepted even when input plus max_tokens exceeds the window. Generation then stops with a stop reason at the limit, while earlier models return a validation error.

OpenAI's guide uses weaker wording: going past the window might lead to truncated outputs. Both pages describe API requests, and we could not find the same detail for chat apps on those pages.

## Do models use all of a long window?

The preprints we read tested particular models and tasks. Anthropic's documentation, as read on 28 November 2026, says accuracy and recall degrade as token count grows, which it calls context rot, but it gives no figure.

The preprints do give figures. In a 2023 preprint by Liu and colleagues, GPT-3.5-Turbo scored lower on a multi-document question task than with no documents at all when the relevant document sat mid-input. That no-document baseline was 56.1% for GPT-3.5-Turbo in the same preprint.

Liu and colleagues found that extended-context versions of 2023 models often matched their shorter versions when the input fit both windows, so longer windows did not guarantee better use. On a simpler synthetic key-value lookup, though, the preprint reports Claude-1.3 and its 100K version did nearly perfectly at every length tested, while the other tested models did worse.

![Three line charts of model accuracy by where the answer document sits, with ten, twenty and thirty documents](https://blog.brandregard.com/media/2026/12/what-is-a-context-window-in-ai-position-chart.png?v=fcaa7369)

That chart is taken from the journal edition: Liu et al., TACL, CC BY license.

RULER, a 2024 preprint from NVIDIA researchers, tested 17 models that all claim at least 32K tokens, using synthetic tasks. Only half kept satisfactory performance at 32K, a bar set by Llama2-7B's score at 4K. Because NVIDIA also builds language models, we count RULER as a vendor-side result.

NoLiMa, a 2025 preprint from LMU Munich and Adobe Research, extends needle-in-a-haystack tests with questions that share little wording with the answer. Of 13 models claiming at least 128K tokens, 11 fell below half their short-context scores at 32K. GPT-4o, among the better performers there, fell from 99.3% at short length to 69.7% at 32K tokens.

The 2024 BABILong preprint tested over 20 long-input models on reasoning over facts scattered through long text. It reports that popular models effectively use only 10 to 20% of the context. For GPT-4 on that benchmark, it puts the figure at about 10% of the 128K window.

These tests use older models, and we could not find them repeated on current ones in the sources read here. Read these figures as measurements of the named models and tasks.

## How large have windows been?

The sources here give dated snapshots, not a current table. Liu and colleagues' 2023 preprint notes that transformer models were often trained on short windows, from 512 to 2048 tokens.

Google said in February 2024 that a limited private preview of Gemini 1.5 Pro offered windows of up to 1 million tokens, well above that older range.

![A very long straight aisle of identical supercomputer cabinets running into the distance](https://blog.brandregard.com/media/2026/12/what-is-a-context-window-in-ai-long-aisle.jpg?v=0a56f8e9)

## What should you check before relying on a window size?

Look up the model's current documentation for its limit and for whether replies count toward it. Then run your own task at realistic input lengths, since the published tests used particular models and tasks.

In our view, treat a window size as a ceiling rather than a promise, judged by whether independent tests show the model still performing at that length.

[Brandregard](/) lists below the sources it read for this page.

Photo credit: NASA/Dominic Hart.

## Sources

- [Stanford HAI: What is a Context Window?](https://hai.stanford.edu/ai-definitions/what-is-a-context-window) (accessed 2026-11-28)
- [Anthropic: Context windows](https://platform.claude.com/docs/en/build-with-claude/context-windows) (accessed 2026-11-28)
- [OpenAI: Conversation state](https://platform.openai.com/docs/guides/conversation-state) (accessed 2026-11-28)
- [Google: What is a long context window?](https://blog.google/innovation-and-ai/products/long-context-window-ai-models/) (accessed 2026-11-28)
- [Liu et al.: Lost in the Middle (preprint)](https://arxiv.org/html/2307.03172v3) (accessed 2026-11-28)
- [Hsieh et al.: RULER (preprint)](https://arxiv.org/html/2404.06654v3) (accessed 2026-11-28)
- [Modarressi et al.: NoLiMa (preprint)](https://arxiv.org/html/2502.05167v3) (accessed 2026-11-28)
- [Kuratov et al.: BABILong (preprint)](https://arxiv.org/html/2406.10149v1) (accessed 2026-11-28)
- [Ahia et al.: Do All Languages Cost the Same? (preprint)](https://arxiv.org/html/2305.13707v1) (accessed 2026-11-28)
