<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/lost-in-the-middle-why-llms-forget-what-they-just-read-q5ptavxli" -->

---
title: Lost in the Middle: Why LLMs Forget What They Just Read
description: LLMs exhibit a 'lost in the middle' phenomenon where information placed in the middle of a long context is systematically ignored, while content at the...
canonical: https://daily.dev/posts/lost-in-the-middle-why-llms-forget-what-they-just-read-q5ptavxli
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: Lost in the Middle: Why LLMs Forget What They Just Read | daily.dev
og:description: LLMs exhibit a 'lost in the middle' phenomenon where information placed in the middle of a long context is systematically ignored, while content at the...
og:url: https://daily.dev/posts/lost-in-the-middle-why-llms-forget-what-they-just-read-q5ptavxli
og:image: https://api.daily.dev/og/posts/Q5pTaVxLi.png
og:image:alt: Lost in the Middle: Why LLMs Forget What They Just Read
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Lost in the Middle: Why LLMs Forget What They Just Read

**[Medium](https://daily.dev/sources/medium_js)** · 13 min read · 1 upvotes · 0 comments

## Summary

LLMs exhibit a 'lost in the middle' phenomenon where information placed in the middle of a long context is systematically ignored, while content at the beginning and end is reliably used. This mirrors the human serial position effect described by Murdock in 1962. Research by Liu et al. (2023) confirmed the U-shaped accuracy curve across multiple models including GPT-3.5-Turbo and Claude. Three mechanisms are proposed: training data bias toward edge positions, attention sinks anchoring early tokens, and positional encoding degradation for mid-context positions. As of 2026, effective context length is roughly 60–70% of advertised maximums, and adding more context can hurt performance even with perfect retrieval. Practical mitigations include placing high-relevance chunks at context edges, re-ranking with position in mind, and testing at real production context lengths rather than toy inputs.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://medium.com/@cristobalsantana.ml/lost-in-the-middle-why-llms-forget-what-they-just-read-2fb5855fef79>

## Questions this post answers

### Why does my RAG system ignore the correct document even though it's included in the context?

Language models exhibit a 'lost in the middle' bias: they reliably use information at the start and end of their context but often fail to use information placed in the middle, even when it directly answers the question. Liu et al. (2023) showed this U-shaped accuracy pattern across GPT-3.5, Claude, MPT, and Longchat, and it worsens as context length grows.

_Debugging retrieval quality issues in RAG pipelines is easier when daily.dev surfaces research like this alongside practical fixes._

### What is the effective context length of long-context LLMs compared to their advertised maximum?

Independent benchmarks such as RULER found that of models claiming 32k+ tokens, only about half handle 32k reliably, and effective usable capacity across models is roughly 60-70% of the advertised maximum. A model advertising a 1 million token window may only reliably use 600k-700k tokens, with the rest failing to show up in output quality.

_Developers choosing between long-context models can track benchmark findings like this through daily.dev._

### How can I reduce the impact of the lost-in-the-middle problem in a production RAG system?

Reorder retrieved chunks so the highest-relevance results sit at the start and end of the context rather than sorted purely by similarity score, since edge placement measurably improves accuracy. Also re-rank with position in mind, test performance at real production context lengths using multi-needle retrieval rather than toy inputs, and consider training-side fixes like IN\u00b2-training if you control the model.

_Teams shipping RAG systems can find practical mitigation patterns like these through daily.dev before something breaks in production._

## Similar posts on daily.dev

- [The LLM Blindspot: Why Models Forget What’s in the Middle of Your Prompt](https://daily.dev/posts/the-llm-blindspot-why-models-forget-what-s-in-the-middle-of-your-prompt-y1pryxmaz) · ByteByteGo · 36 upvotes · 8 comments
- [The Context Window Myth: Why Bigger Isn’t Always Better in LLM Applications](https://daily.dev/posts/the-context-window-myth-why-bigger-isn-t-always-better-in-llm-applications-by4yg2kso) · Medium · 1 upvotes · 0 comments
- [Golden Rule](https://daily.dev/posts/golden-rule-3kj34ym0h) · Larablog · 1 upvotes · 0 comments

---

Tags: [#llm](https://daily.dev/tags/llm), [#rag](https://daily.dev/tags/rag)

[View this post on daily.dev](https://daily.dev/posts/lost-in-the-middle-why-llms-forget-what-they-just-read-q5ptavxli)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"Lost in the Middle: Why LLMs Forget What They Just Read","url":"https://daily.dev/posts/lost-in-the-middle-why-llms-forget-what-they-just-read-q5ptavxli","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/lost-in-the-middle-why-llms-forget-what-they-just-read-q5ptavxli"},"datePublished":"2026-07-18T02:47:43.556Z","dateModified":"2026-09-13T20:04:15.246Z","description":"LLMs exhibit a 'lost in the middle' phenomenon where information placed in the middle of a long context is systematically ignored, while content at the...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/56ccf0a1c1d23382e73285999681c09b?_a=AQAEuop","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/56ccf0a1c1d23382e73285999681c09b?_a=AQAEuop","isAccessibleForFree":true,"articleSection":"Medium","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"Medium","logo":"https://media.daily.dev/image/upload/t_logo,f_auto/v1/logos/medium","url":"https://daily.dev/sources/medium_js"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/lost-in-the-middle-why-llms-forget-what-they-just-read-q5ptavxli","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":1},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"llm,rag","timeRequired":"PT13M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Medium","item":"https://daily.dev/sources/medium_js"},{"@type":"ListItem","position":3,"name":"Lost in the Middle: Why LLMs Forget What They Just Read"}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/lost-in-the-middle-why-llms-forget-what-they-just-read-q5ptavxli#faq","mainEntity":[{"@type":"Question","name":"Why does my RAG system ignore the correct document even though it's included in the context?","acceptedAnswer":{"@type":"Answer","text":"Language models exhibit a 'lost in the middle' bias: they reliably use information at the start and end of their context but often fail to use information placed in the middle, even when it directly answers the question. Liu et al. (2023) showed this U-shaped accuracy pattern across GPT-3.5, Claude, MPT, and Longchat, and it worsens as context length grows. Debugging retrieval quality issues in RAG pipelines is easier when daily.dev surfaces research like this alongside practical fixes."}},{"@type":"Question","name":"What is the effective context length of long-context LLMs compared to their advertised maximum?","acceptedAnswer":{"@type":"Answer","text":"Independent benchmarks such as RULER found that of models claiming 32k+ tokens, only about half handle 32k reliably, and effective usable capacity across models is roughly 60-70% of the advertised maximum. A model advertising a 1 million token window may only reliably use 600k-700k tokens, with the rest failing to show up in output quality. Developers choosing between long-context models can track benchmark findings like this through daily.dev."}},{"@type":"Question","name":"How can I reduce the impact of the lost-in-the-middle problem in a production RAG system?","acceptedAnswer":{"@type":"Answer","text":"Reorder retrieved chunks so the highest-relevance results sit at the start and end of the context rather than sorted purely by similarity score, since edge placement measurably improves accuracy. Also re-rank with position in mind, test performance at real production context lengths using multi-needle retrieval rather than toy inputs, and consider training-side fixes like IN\\u00b2-training if you control the model. Teams shipping RAG systems can find practical mitigation patterns like these through daily.dev before something breaks in production."}}]}
```

