Context and memory · about 15 minutes of study

Lost in the middle

Some long-context experiments find lower retrieval performance when relevant information appears in the middle. This is an observed behavior to test, not a rule for every model or task.

Before you start: Review Context engineering first. Python-like examples use variables, lists and functions.

Guided concept walkthrough

Follow the mechanism

Fixed evidence

Keep the relevant passage unchanged.

1 / 4

A conceptual animation, not a live model trace. Play advances every five seconds and stops at the final stage.

Start with an everyday explanation

A long folder may make a key page easier to overlook. Moving it can help, but you should check whether the reader actually uses the page.

See a concrete example

Place the same answer-bearing clause at positions 1, 5 and 10 of ten passages. Run multiple labeled questions and compare the paired outcomes.

A claim to question

Every model does not have an identical U-shaped recall curve.

Try before revealing the answer

Design a position-sensitivity experiment without changing document content between conditions.

Show the worked answer

Rotate the same relevant passage through positions, keep token budget and decoding fixed, use multiple queries and report uncertainty. Avoid interpreting one anecdote as a general performance result.

Now explain the idea to someone else using your own example. If you cannot explain a stage, revisit it before moving on.

Your explanation and revision notes

Loading local notes…

Read the primary reference

Lost in the Middle

The explanation and exercises are original teaching material. The linked source provides background; examples and assumed numbers here are not claims about a particular company.