Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

iTechGuides is reader-supported. When you buy through links on our site, we may earn an affiliate commission. As an Amazon Associate I earn from qualifying purchases. Learn more

LLMs can miss useful information placed in the middle of a long prompt, even when the same information is easier for them to use near the beginning or end. Researchers call this the “lost in the middle” effect. It is shorthand for position sensitivity in specific tests—not evidence that every model literally forgets, or that every long prompt fails.

What “lost in the middle” means

A model’s context window describes how much text it can accept; it does not guarantee that the model will reliably find and use every relevant detail inside that window. In long-context evaluations, researchers hold the task and relevant information broadly constant while changing where that information appears. A common result is a U-shaped performance pattern: stronger performance when evidence is near the start or end, and weaker performance when it is in the middle.

The terms primacy bias and recency bias refer here to that measured advantage for information near the beginning and end. They describe evaluation results, not a complete explanation of a model’s internal process.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

What the original study tested

Nelson F. Liu and coauthors examined the issue in a 2024 paper in Transactions of the Association for Computational Linguistics. They tested multi-document question answering and synthetic key-value retrieval, varying context length and moving the answer-bearing document or key-value pair through the input. Their reported pattern was that tested models often used relevant material more successfully near the beginning or end than in the middle. Read the TACL paper.

One striking comparison needs careful interpretation: Liu et al. report a 56.1% closed-book score for GPT-3.5-Turbo on their multi-document QA comparison. In that setup, its performance when the relevant information was in the middle fell below the score it achieved answering without documents. The 56.1% figure is the closed-book comparison score—not the model’s middle-position score, a general accuracy rate, or a result for every model or task.

Why this matters for long prompts and RAG

In retrieval-augmented generation (RAG), a system supplies documents as context and asks a model to answer using them. That makes the original multi-document QA setup relevant: the challenge is not only retrieving evidence, but also having the model locate and use it in the supplied context. The study does not compare every commercial RAG system, so its findings should not be treated as a ranking or universal failure rate.

For everyday prompting, the practical implication is narrower: a detail being inside the context window is not proof that the model used it. If an answer must rely on a particular fact, make that fact easy to identify and verify the response against the source material.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

What later research adds

A proposed mitigation: calibration

In 2024, Cheng-Yu Hsieh and coauthors described a calibration method intended to address positional attention bias. Their Google Research publication reports improved information location and RAG performance across evaluated tasks, with gains of up to 15 percentage points over comparison methods. That is the paper’s reported maximum, not a guaranteed improvement for another model, dataset, or production workload. Read the Google Research publication.

Multiple evidence pieces can create a different challenge

A 2025 ACL Findings paper introduced LongPiBench, which evaluates multiple relevant passages across tasks and input lengths. Its authors report that most tested commercial and open-source models were more robust to the classic lost-in-the-middle pattern, but still showed noticeable bias related to the spacing between relevant pieces. A model may therefore handle one passage at a range of positions yet struggle when it must combine evidence that is spread apart. Read the LongPiBench paper.

This qualification matters when interpreting simple “needle” retrieval tests: finding one inserted fact does not establish that a model can reliably integrate several pieces of evidence across a long input. Tian et al. summarize the point: “These findings highlight the importance of evaluating and reducing positional biases for long-context LLMs.”

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

How to check whether a model uses long-context evidence

If you are choosing a model or building a document-based workflow, test the actual task rather than relying only on the advertised context-window size.

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
  1. Use representative questions and source material. Include questions that require locating a fact and, where relevant, combining information from multiple passages.
  2. Move evidence through the context. Test relevant material near the beginning, in the middle, and near the end while keeping the question and evidence as consistent as possible.
  3. Vary spacing and context length. For tasks involving several sources, change how far apart the relevant passages are; also test the input lengths your workflow will actually use.
  4. Score evidence use, not just fluent answers. Check whether the response is supported by the supplied passages, whether it combines them correctly, and whether it acknowledges missing evidence.
  5. Compare the tested configurations. Record the model version, prompt, context length, evidence positions, and scoring method so that results are interpretable and repeatable.

This is a task-specific evaluation, not a universal benchmark. The studies discussed here do not establish a population-wide failure rate or a current vendor-by-vendor ranking. Results depend on the model, task, context, and evaluation setup.

Best Value
Language Fundamentals, Grade 1
  • Language fundamentals grade 1
  • Language skills
  • Grammar practice

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.