Same topic, related formats. Practice these next.
Same topic, related formats. Practice these next.
Lost-in-the-middle produces a U-shaped accuracy curve: models attend reliably to the start (primacy) and the end (recency) of a long context but skip content placed in the interior.
Imagine a teacher reading a long list of names and later asking which names were on it. Students remember the first few (they were paying full attention at the start) and the last few (those are still ringing in their ears). The middle names get fuzzy. Language models do something similar with long context: the names at the start and end stick, the names in the middle blur. Plot what they remember against where the name was in the list, and you get a U-shape: high on both ends, low in the middle. The trick for context engineering is to put the important stuff where the U is high, not where the U is low.
Everything you need to truly understand this topic: intuition, mechanics, step by step explanation, code, formulas, and worked example. Click to expand.
Everything you need to truly understand this topic: intuition, mechanics, step by step explanation, code, formulas, and worked example.
Everything important, quickly.
Identify the U-shape. Name primacy and recency. Explain the attention mechanics behind each. Cite the Liu et al. (2023) paper. Note how the curve has shifted on 2026 frontier models without disappearing. Close with the head and tail positioning trick that operationalizes the finding.
Real products, models, and research that use this idea.
What an interviewer would ask next. Try answering before peeking at the approach.
Red flags and common mistakes that signal junior thinking. Click to expand.
Expecting accuracy to decay monotonically with position and missing that the start is also a privileged location, not just the end.
The night-before-the-interview bullets. Scan these on the way to the call.
Primary sources. Skim if you want the original framing.