Does model quality degrade in long contexts?

Yes, quality degrades unevenly. Models usually find one fact near the start or the end of a long prompt, and get worse when the fact sits in the middle, when several facts must be combined, or when the prompt is full of near-miss distractors. The advertised context limit is a capacity, not a quality guarantee.

Updated

Position matters: the lost-in-the-middle effect

Long-context tests that place one relevant sentence at different depths in a long document show a U-shaped curve. Accuracy is highest when the sentence is near the beginning or the end of the prompt and lowest when it sits in the middle. The effect was documented in the paper "Lost in the Middle: How Language Models Use Long Contexts" (Liu et al.), and it still shows up in practice. A prompt that fits inside the window can therefore produce a worse answer than the same question with a shorter, cleaner context.

Task shape matters more than length

Single-fact retrieval is the easy case, and it is the case vendors demonstrate. Real work looks different:

Advertised context versus effective context

A model that accepts one million tokens does not use one million tokens equally well. The usable region depends on the task, the number of distractors and the position of the evidence. Treat the effective context as something you measure for your own workload, and treat the advertised number as a hard limit that you should not fill on purpose.

Test degradation on your own documents

  1. Pick 20 questions whose answers are single sentences in your corpus.
  2. For each, build three prompts: evidence at the start, evidence in the middle, evidence at the end, with the same total length.
  3. Score exact matches or a strict rubric, not whether the answer sounds plausible.
  4. Repeat with a second document set at half the length. If accuracy is stable at half length and drops at full length, you have measured degradation rather than a bad question set.
  5. Repeat the middle case with five facts instead of one. The drop tells you how much aggregation your workload can take.

Run the same grid on any candidate model before you switch. A model with a smaller window can beat a larger one on your documents, and the grid is the cheapest way to find out.

What to do about it

Treat long context as a tool for a specific job, not as a replacement for retrieval. The two work best together: retrieve a small candidate set, then give the model enough room to reason over it.