Salar Saeedi

Applied AI · Analysis

The missing paragraph in a long AI context window

Use a controlled position test to see whether your model can find key evidence halfway through a long input.

Salar Saeedi2 min read
Three-stage illustration — The missing paragraph in a long AI context window

A context window specifies how much input a model can accept. A compliance reviewer cares whether the system can reliably use a qualifying exception on page 47. Those are different questions, and a short experiment can expose the gap.

The position effect in the paper

Lost in the Middle varied the position of relevant information in tasks including multi-document question answering and key-value retrieval. Performance often improved when the signal was placed early or late and fell when it was placed in the middle. Results describe the tested models and tasks. A contemporary model needs its own trial.

Source · Liu et al. — Lost in the Middle

Build a position-only experiment

Use a fictitious service policy with one clause that changes a refund deadline and several plausible decoys. Create three inputs with the same passages and token budget. Move only the decisive clause to the start, center or end. Ask the same question with fresh conversations and score the exact deadline and cited clause separately.

Source · Liu et al. — Lost in the Middle

Spend tokens around the task

Index stable headings and pull the relevant clause and its neighboring definitions into a focused evidence packet. Preserve the source offsets. Rerun the position test on the compact input, including a case where the clause is absent. A refusal to answer may be correct on that case.

Source · Anthropic — Context engineering for AI agents

What to take away

Track accuracy by evidence position and include one middle-position example in every long-document regression set.

References

Related work in the portfolio