Prompt & Context Engineering·Question 57 of 68Quick-fire

What is "lost in the middle" and how do you design around it?

Quick-fire answer from the Awesome Generative AI Guide (MIT)

Type it the way you would explain it to an interviewer. A few sentences is enough; you can't break anything.

Model answer: the part to lead with

Models retrieve information best when it sits near the start or the end of the context and worst when it is buried in the middle of a long prompt. So blindly stuffing dozens of retrieved chunks in arbitrary order wastes them. Design around it by retrieving fewer, higher-quality chunks, reranking so the most relevant content is placed at the edges, and keeping the total context tight. This is one reason "more context" is not automatically "better answers."

Full worked answer

Models retrieve information best when it sits near the start or the end of the context and worst when it is buried in the middle of a long prompt. So blindly stuffing dozens of retrieved chunks in arbitrary order wastes them. Design around it by retrieving fewer, higher-quality chunks, reranking so the most relevant content is placed at the edges, and keeping the total context tight. This is one reason "more context" is not automatically "better answers."

Learn more: Lost in the Middle (Liu et al.)

What a good answer covers

  • Models retrieve information best when it sits near the start or the end of the context and worst when it…
  • So blindly stuffing dozens of retrieved chunks in arbitrary order wastes them
  • Design around it by retrieving fewer, higher-quality chunks, reranking so the most relevant content is…
  • This is one reason "more context" is not automatically "better answers."

Key terms: Learn more

Quick-fire answer from the Awesome Generative AI Guide (MIT) · answer text last updated 6 November 2026 · scoring and review schedule by LLM Prep