llm-lost-in-middle-serial-position-effect

IN premise — summaries/2026/08/24/liu-2023-lost-in-middle-sA-acknowledgments.md

Created 2026-08-25T02:58:09+00:00

Transformer-based language models exhibit a U-shaped performance curve in long contexts: accuracy is highest when the relevant information is at the beginning or end of the input, and lowest when it is in the middle.

Summary

Transformer language models pay noticeably more attention to what they read first and last than to what sits in the middle, so critical instructions or facts buried deep in a long prompt are more likely to be ignored. This means you cannot treat a prompt as a flat pile of equally weighted text; where you place information directly changes how well the model will use it, and system designers need to be deliberate about ordering.