Lost in the Middle

"Lost in the Middle" is a 2023 paper by Stanford researchers showing that language models use information at the beginning and end of long inputs well but tend to miss information in the middle.

1 articleLast mentioned

"Lost in the Middle: How Language Models Use Long Contexts" is a paper published in 2023 by Nelson F. Liu and colleagues at Stanford University. In experiments that gave models multiple documents and asked them to find an answer, accuracy was high when the relevant information sat at the very beginning or end of the input but dropped sharply when it was in the middle, producing a U-shaped performance curve. The same tendency appeared in models that support long context windows.

The phenomenon has come to be known as "lost in the middle" and is frequently cited in practical LLM work, including how documents are ordered in RAG (retrieval-augmented generation), how long prompts are structured, and designs that place instructions to agents at the start or end of the context.

This entry is based on AIPOST articles and widely known facts. If something is wrong, please send us a correction request.

Articles covering this entry

  • Example Mapping Plus TDD Lifts AI Agent Code Correctness From 27% to 94%AI in Practice ·

    …and the team connected that to the Stanford paper "Lost in the Middle: How Language Models Use Long Contexts." Its finding is that LLMs retrieve information bes…

    Read article

Found a mistake or missing an entry?

Wiki entries are based on AIPOST articles and widely known facts. If an entry is wrong, send us a correction request and we will check and fix it. Names from new articles are added to the wiki after the article is published.