Skip to content
BENIBIX Learn

Lost in the Middle

AI💬 LLMsLanguage Model Limits

Also known as Lost-in-the-Middle Effect, Middle Context Problem

Models miss facts in the middle of a long text more often.

Think of it like

Think of it like a long list read out loud. You remember the start and the end, but not the middle.

Example

Jack pastes 20 documents and asks a question whose answer is in document 10. The model misses it, but finds it when that document is moved to the top.

Why it matters

A big context window does not mean every part of it is read just as well.

Definition

Lost in the middle is the finding that language models use facts at the start or end of a long input better than facts in the middle. When the key fact sits in the middle of many pages, the model misses it more often. A 2023 study showed the drop clearly, with a U-shaped curve. Newer models handle long inputs better, but the effect still shows up. Putting the key text near the start or end helps.
When the key fact sits in the middle of a long input, the model finds it less often.

Common mistake

Dumping everything into the prompt and trusting it all gets used. Put the most important part first or last.

Key takeaways

  1. 1
    Start and end win. Middle is weaker.
  2. 2
    A U-shaped curve. Found in a 2023 study.
  3. 3
    Order your input. Key text first or last.

Compare

Learn it properly