The AI Reader.
The Instruments

Every context window has a second number, and it is smaller

Labs advertise 128K, 1M, even 2M tokens as the length a model will accept. A separate test measures how much of it the model actually uses, and the answer routinely lands far below the number on the box.

Why this matters

Every few months a lab announces a bigger context window: 128,000 tokens, then a million, then two million. The number is the headline spec, the way megapixels once sold cameras. It decides whether you can drop an entire codebase, a book, or a year of email into a single prompt and ask about all of it at once.

This lesson is about what that number does and does not promise. By the end you will be able to tell two things apart: how much text a model will accept, and how much of it the model actually uses well. The first is the number on the box. The second is smaller, it is measured by its own tests, and knowing it is the difference between trusting a long-context answer and checking it.

Background optional reading
01
Change which SWE-bench tasks are counted and GPT-4o's score doubles: a sibling lesson on how a headline AI number can mean less than it says once you ask how it was measured.
02
Simon Willison, long-context tag: an ongoing, hands-on log of what current models actually do when you feed them very long inputs.

The number on the box

When Google introduced Gemini 1.5, it reported that the model could recall a planted fact with better than 99 percent accuracy across as much as 10 million tokens of text, far past the 128,000 tokens of GPT-4 Turbo or the 200,000 of Claude 3.1 A token is the unit a model reads, roughly three-quarters of an English word, so 10 million tokens is something like 7.5 million words, a small library. This is the context window: the largest amount of text a model will accept in one go. Labs now print it on the box the way a phone prints its storage, and the numbers have climbed from a few thousand tokens to one and two million in three years.

The window is a real limit and a real achievement. It is also two different numbers wearing one label. The first is how much text the model will take. The second is how much of that text it uses well. The second number is measured by separate tests, and it is smaller.

How the ceiling gets set

The window is not a setting someone types in. It is fixed by two things: how the model marks the position of each word, and how long the texts were that it trained on.

Take position first. A model reads all of its input at once, so it needs a way to know that the fifth word comes after the fourth. Most current models use rotary position embedding, or RoPE, which marks a token's position by rotating its representation by an angle that grows with the position.2 Word one gets a small rotation, word one thousand a much larger one, and the math lets the model feel how far apart any two words sit.

Those rotations are only practiced up to the longest texts the model trained on. Feed it a longer input and the angles run past anything it saw during training, where its accuracy falls apart. So the advertised window is, at bottom, the longest sequence the position scheme and the training data were built to handle.1 It is a ceiling the lab sets, then reports.

Moving the ceiling after the fact

That ceiling can move. In 2023, researchers at Meta showed a method called position interpolation: instead of letting positions run off the end of the trained range, squeeze them back into it. A word at position 8,000 is relabeled as position 500, inside the range the model already knows.3 With this, they stretched LLaMA's window from 2,048 tokens to 32,768, a sixteenfold jump, using fewer than 1,000 steps of extra training.3

This changes how to read the number. A context window is not a fixed property of a model that its makers discover. It is partly an engineering choice: train a little more, rescale the positions, and announce a larger number. The window is set and then extended, which is why the same base model can ship with one length this month and a bigger one the next.

The easy test everyone passes

So how does anyone check whether a model uses a two-million-token window? The most common test is called needle in a haystack, built by Greg Kamradt. Plant a single out-of-place sentence, the needle, somewhere inside a long block of filler text, the haystack, then ask the model to repeat it back.4 Slide the needle through every depth and every length, and you get a grid of how often the model finds it.

Models pass this test almost perfectly. Gemini 1.5's better-than-99-percent recall across 10 million tokens is a needle-in-a-haystack score.1 But finding one planted sentence is the easiest thing a long context can ask for. The needle is written to stick out, and the model only has to copy it, not use it. The team behind a harder benchmark, RULER, said so plainly: the needle test measures “only a superficial form of long-context understanding.”5

Retrieving a fact is one narrow slice of what people do with a long context. They also summarize across a whole document, answer questions that need two passages combined, and follow instructions buried in the middle. LongBench, a benchmark that scores exactly these jobs, spreads across twenty-one datasets and six task types for that reason.6 A single retrieval number says little about any of them.

The number measured separately

So the field measures the second number directly. RULER runs 17 models through 13 tasks at growing lengths and finds where each one stops performing well. The result is stark: every model tested claims a window of at least 32,000 tokens, but only half still perform acceptably once the input actually reaches 32,000 tokens.5 That cutoff is RULER's own bar rather than a hard wall, but the pattern holds across the field: the length a model can use trails the length it will accept.

Where inside the window a fact sits matters too. In “Lost in the Middle,” researchers moved the same needed fact to different positions in a long input and watched accuracy trace a U: highest when the fact sat at the very start or the very end, lowest when it sat in the middle, even for models built for long context.7 A summary that quietly drops the middle of a document is not a worry someone invented. It is the direct cost of this effect, paid by anyone who trusts the summary without checking it.

Those studies used the models of 2023, and it is fair to ask whether newer ones fixed the problem. They did not. In 2025, the research group at Chroma ran 18 current models, among them GPT-4.1, Claude 4, and Gemini 2.5, and found the same thing: “their performance grows increasingly unreliable as input length grows,” even on simple tasks.8

None of this makes the advertised number a lie. Gemini really does retrieve a planted fact at 10 million tokens. The point is narrower and more useful: a model that accepts a length is not promising to reason across it, and the gap does not show up on the spec sheet. It is why people who work with these models day to day treat a big context claim as something to test rather than take on faith.9

The takeaway

A context window is a ceiling, not a guarantee. It tells you the longest input the model will accept, a length its position scheme and its training set. Labs can raise that ceiling with a little extra training, so the number is partly an engineering choice they announce.

What the number cannot tell you is how well the model uses that space. That is a separate measurement, and it comes back smaller: an effective length below the advertised length, accuracy that sags in the middle of a long input, reliability that fades as the input grows. A perfect needle-in-a-haystack score means the model can find a planted sentence, not that it can reason over everything around it. When a model says it accepts a million tokens, treat that as the start of a question, not the answer: how much of the million can it actually use, and who measured?

Go deeper optional reading
01
RULER: What's the Real Context Size of Your Long-Context Language Models?: the benchmark that measures effective length, with per-model results across many tasks and lengths.
02
Lost in the Middle: How Language Models Use Long Contexts: the original study of how position inside a long input changes what a model can find.
03
Context Rot (Chroma, 2025): 18 current models tested for how reliability changes as input grows, with the raw curves.

Sources

  1. Gemini Team, Google · Gemini 1.5: Unlocking multimodal understanding across millions of tokens of context (2024)
  2. Su et al. · RoFormer: Enhanced Transformer with Rotary Position Embedding (2021)
  3. Chen et al. · Extending Context Window of Large Language Models via Positional Interpolation (2023)
  4. Greg Kamradt · LLMTest_NeedleInAHaystack (GitHub repository)
  5. Hsieh et al. · RULER: What's the Real Context Size of Your Long-Context Language Models? (2024)
  6. Bai et al. · LongBench: A Bilingual, Multitask Benchmark for Long Context Understanding (2023)
  7. Liu et al. · Lost in the Middle: How Language Models Use Long Contexts (2023)
  8. Hong, Troynikov & Huber, Chroma · Context Rot: How Increasing Input Tokens Impacts LLM Performance (2025)
  9. Simon Willison · Things we learned about LLMs in 2024 (2024)