<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Siddhesh khira on Medium]]></title>
        <description><![CDATA[Stories by Siddhesh khira on Medium]]></description>
        <link>https://medium.com/@sidkhira01?source=rss-f80fe3d1f3c2------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*d135_KQXxu8YZvKQut0Mbw.jpeg</url>
            <title>Stories by Siddhesh khira on Medium</title>
            <link>https://medium.com/@sidkhira01?source=rss-f80fe3d1f3c2------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 23 Nov 2026 12:29:30 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@sidkhira01/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[The Context Window Is Not Enough: Why LLMs Fail to Use Evidence in Their Prompts]]></title>
            <link>https://medium.com/@sidkhira01/the-context-window-is-not-enough-why-llms-fail-to-use-evidence-in-their-prompts-6dc65ec42806?source=rss-f80fe3d1f3c2------2</link>
            <guid isPermaLink="false">https://medium.com/p/6dc65ec42806</guid>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[machine-learning]]></category>
            <dc:creator><![CDATA[Siddhesh khira]]></dc:creator>
            <pubDate>Sat, 17 Oct 2026 21:34:56 GMT</pubDate>
            <atom:updated>2026-10-17T21:34:56.017Z</atom:updated>
            <content:encoded><![CDATA[<h3>1. The opening puzzle: the same evidence, different positions</h3><p>Long-context language models can process more information than ever, but a larger context window does not guarantee better use of evidence. Research on positional bias, attention calibration, and context-length degradation reveals several distinct reasons models can fail even when the relevant information is present. Understanding these failures requires separating evidence retrieval from interpretation and application.</p><p>In Liu et al.’s 2024 experiments, GPT-3.5-Turbo-0613 achieved 56.1% accuracy on multi-document questions without supplied documents and 88.3% when given only the document containing the answer. Yet in some multi-document configurations, accuracy fell below the closed-book baseline when the answer-bearing document appeared in the middle of the context.</p><p>The first comparison is striking, but it changes several things at once: the amount of text, the presence of distractors, and the conditions under which the model must answer. It cannot, by itself, explain why performance declines. To investigate position, Liu et al. also held the document collection fixed and moved the answer-bearing document through it. Accuracy changed with its location.</p><p>That result is harder to explain away. The relevant document remained in the input, but the model’s ability to answer correctly depended on where it appeared.</p><p>This phenomenon is known as <em>lost in the middle</em>. It captures one failure of long-context systems, but not all of them. Other research finds that performance can deteriorate as the input grows even when the relevant evidence is made easier to locate.</p><p>A context window specifies how much text a model can accept. It does not tell us how reliably the model will use that text. To understand the gap, we need to distinguish having evidence available from finding it, understanding it, and applying it correctly.</p><h3>2. Define the failure before explaining it</h3><p>A wrong answer does not reveal where the process failed. The evidence may never have reached the model, the model may have overlooked it, or it may have understood the passage but used it incorrectly. These failures can produce the same visible result.</p><p>Four distinctions help separate them:</p><ul><li><strong>Presence:</strong> Did the relevant evidence reach the model without being truncated or lost during preprocessing?</li><li><strong>Localization:</strong> Did the model identify the passage that mattered?</li><li><strong>Interpretation:</strong> Did it correctly understand the passage, including who did what, which date or unit applied, and whether a claim was negated?</li><li><strong>Application:</strong> Did it use that understanding correctly to answer the question, combine facts, follow a constraint, or perform a calculation?</li></ul><p>These are analytical categories, not necessarily four separate mechanisms inside a model. They can overlap. A model might select the right passage and misread a comparison within it; it might understand two facts individually but combine them incorrectly.</p><p>The categories also suggest different tests. Asking a model to quote a passage provides evidence about whether it can reproduce the relevant text, but a quotation alone does not establish understanding. Giving the model only the relevant passage tests its ability to answer when the evidence is isolated, although this changes the task and removes potential interference. Measuring final-answer accuracy captures the outcome, but not the stage at which the error occurred.</p><p>The distinction is practical, not merely terminological. A method that improves passage selection may do little for arithmetic or contradiction resolution. Likewise, a model that answers correctly from an isolated passage may still struggle when that passage is embedded in a large collection.</p><p>The research is most informative when we ask which of these capabilities an experiment actually tests.</p><h3>3. What Lost in the Middle measured</h3><p>Liu et al. (2024) investigated how the position of relevant information affects answer accuracy through two tasks.</p><p>In multi-document question answering, models received a question alongside 10, 20, or 30 short documents. One contained the annotated answer; the others served as distractors. The researchers changed the answer-bearing document’s position while keeping the document collection fixed.</p><p>They also tested synthetic key-value retrieval. The model received a list of key-value pairs and had to return the value associated with a specified key. Because this task involves a more direct form of lookup, it reduces the natural-language complexity of multi-document question answering.</p><p>Across many of the tested settings, performance was highest when the relevant information appeared near the beginning or end of the input and lower when it appeared in the middle. The effect varied by model: some handled the synthetic retrieval task almost perfectly, while others showed substantial positional sensitivity. The results therefore demonstrate a recurring weakness, not a uniform limitation affecting every model equally.</p><p>The study’s closed-book and oracle conditions provide a useful reference point. The closed-book model received no documents; the oracle model received only the answer-bearing document. GPT-3.5-Turbo’s accuracy rose from 56.1% to 88.3% between those conditions. Yet placing the evidence within a longer collection could erase that advantage.</p><p>The oracle result shows that the model could often answer when the relevant document was isolated. The position experiment shows that this ability did not reliably survive changes in document placement. Neither result establishes exactly whether the intervening failure was missed evidence, misinterpretation, or incorrect application.</p><p>The important conclusion is narrower than saying that models cannot handle long contexts: <strong>the location of relevant evidence can change the answer, even when the evidence itself has not changed.</strong> Liu et al.’s <a href="https://direct.mit.edu/tacl/article/doi/10.1162/tacl_a_00638/119630/Lost-in-the-Middle-How-Language-Models-Use-Long">Figure 5</a> illustrates the positional accuracy curves.</p><h3>4. Access Is Not Influence</h3><p>A transformer can process information from many positions without using every relevant fact effectively. The distinction becomes clearer by looking briefly at self-attention.</p><p>In a transformer, learned projections produce <strong>queries</strong>, <strong>keys</strong>, and <strong>values</strong> from token representations. Queries are compared with keys to calculate attention weights, which determine how the corresponding value vectors are combined. In simplified form:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*55NlP8rG48GL4JhGSlfEcg.png" /></figure><p>Here, Q, K, and V collect the query, key, and value vectors, while 𝑑ₖ is the key-vector dimension. Actual models use multiple attention heads, positional mechanisms, residual connections, and feed-forward layers.</p><p>For decoder-only models, causal masking prevents a position from attending to future tokens. When a model generates an answer after a set of documents, its answer-generating positions can ordinarily attend to the earlier documents, including those in the middle. The architecture permits the evidence to contribute; it does not guarantee that it will exert the right influence on the answer.</p><p>An attention weight is also not a direct measure of how much a fact determines the final prediction. Information passes through multiple computations, combines with other signals, and may be transformed before the model produces an answer.</p><p>This matters because positional attention patterns offer a possible explanation for the lost-in-the-middle effect, but they are not sufficient evidence on their own. To establish a role in the failure, researchers must connect the pattern to behavior and test whether changing it improves the cases the explanation predicts.</p><p>That distinction separates the attention studies from research asking a different question: whether long inputs can impair performance even when retrieving the evidence is no longer the main difficulty.</p><h3>5. What the studies establish about position, structure, and length</h3><p>Three lines of research help separate these explanations. Liu et al. manipulate evidence position and measure the resulting behavior. Hsieh et al. and Yi et al. investigate positional attention and use it to guide interventions. Du et al. reduce the difficulty of locating evidence to test whether input length still matters.</p><h4>Position and attention</h4><p>Hsieh et al. (2024), in <a href="https://aclanthology.org/2024.findings-acl.890/"><em>Found in the Middle</em></a>, examined positional attention bias in retrieval-augmented question answering. They found that attention often followed a U-shaped pattern, with higher attention near the beginning and end of an input. They then introduced an attention-calibration method designed to compensate for this bias.</p><p>The intervention improved relevant-document localization and downstream retrieval-augmented generation performance, with reported gains of up to 10 percentage points on evaluated tasks. This is stronger evidence for an attention-based explanation than an accuracy curve alone: the researchers identified a pattern and changed the computation to address it.</p><p>There is still a limit to what the result establishes. Calibration can show that the measured bias matters in the tested settings without showing that it explains every long-context error. In particular, it does not establish that attention is the main cause of failures that persist after evidence has been located.</p><h4>Document structure and ordering</h4><p>Yi et al. (2026), in <a href="https://aclanthology.org/2026.acl-long.1198/"><em>Attention Basin</em></a>, studied attention to structured items such as retrieved documents and few-shot examples. They found that items near the beginning and end tended to receive more attention than those in the middle. Their method, AttnRank, estimates a model’s positional preferences and reorders items to place important information in positions where the model is more likely to attend to it.</p><p>The authors report improvements on multi-hop question answering and few-shot learning across ten language models. This matters for a different reason from Hsieh et al.’s calibration: the model need not be retrained or have its attention computation directly adjusted for a better ordering to help.</p><p>The result also introduces an important qualification. If moving documents improves performance, attention preferences may be useful for predicting where evidence should go. But the success of reordering does not prove that attention bias is the only mechanism involved. An intervention can exploit a behavioral regularity without fully explaining its origin.</p><h4>Context length beyond retrieval</h4><p>Du et al. (2025), in <a href="https://aclanthology.org/2025.findings-emnlp.1264/"><em>Context Length Alone Hurts LLM Performance Despite Perfect Retrieval</em></a>, tested five open- and closed-source models on mathematics, question answering, coding, and synthetic tasks.</p><p>Their controls included replacing irrelevant material with whitespace, masking irrelevant tokens in tested settings, and placing all relevant evidence immediately before the question. Performance still declined as the input grew in many configurations.</p><p>This result challenges the idea that lost-in-the-middle failures are simply retrieval failures. Making evidence easier to locate did not consistently restore short-context performance. The location of evidence matters, but it cannot account for every observed length-related decline.</p><p>The three lines of research are therefore complementary rather than interchangeable:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*VupoRaycetVaPYKKf3o8bQ.png" /></figure><p>A useful way to read these results is to treat them as evidence for multiple effects, not one universal mechanism. Position can disadvantage a passage; attention-guided interventions can mitigate some of that disadvantage; longer inputs can cause additional degradation. A single wrong answer may involve more than one of these effects.</p><p>This also reveals a limitation in the literature. Many evaluations still report final-answer accuracy as the main outcome. That measure is useful for assessing a system, but insufficient for diagnosing why it failed.</p><h3>6. What the interventions change</h3><p>The interventions address different parts of the problem. Their success is easier to interpret when we distinguish the change each method makes from the capability it demonstrates.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*RrqlF1IF_tPYb6x0nxCG7g.png" /></figure><p>He et al. (2024), in <a href="https://aclanthology.org/2024.acl-long.736/"><em>Never Lost in the Middle</em></a>, demonstrate the training approach. Their Position-Agnostic Multi-step QA method explicitly trains models to handle question answering through decomposed steps. The authors report a 13.7-percentage-point advantage over their state-of-the-art comparison in shuffled settings and a 21.5-point gain on passage retrieval.</p><p>These results show that positional robustness can be improved through training. The weakness is not simply an inevitable consequence of using a transformer. However, gains on the evaluated datasets do not establish general improvements in contradiction resolution, multi-hop reasoning, or mathematical application.</p><p>Du et al.’s retrieve, recite, then solve approach changes the structure of inference instead. The model first retrieves and recites the relevant evidence, then solves the task from a shorter, evidence-focused prompt. This can reduce the demands placed on the solving stage by the original context. It does not guarantee success: a faulty extraction can produce a clean but incorrect second-stage answer.</p><p>The interventions also differ in what they can tell us about causality. A successful reranking strategy shows that document order matters operationally. A successful attention calibration provides more direct support for the relevance of the measured bias. Training demonstrates that the behavior can be changed through learning, while staged prompting demonstrates that dividing the task can improve the outcome.</p><p>That suggests a stricter standard for evaluating a fix: measure not only whether final accuracy improves, but whether the specific failure the method targets improves as well. A localization method should be evaluated on evidence selection, for example, rather than only on the answer at the end.</p><h3>7. Three open questions worth testing</h3><p>The current evidence suggests several experiments that could distinguish the leading explanations more sharply.</p><h4>1. Is the decline caused by position, length, or structure?</h4><p>A controlled study should manipulate these variables in separate experimental contrasts.</p><p>To test position, hold the question, evidence, distractors, and total token count fixed while moving the answer-bearing passage. To test length, increase the amount of input while controlling the passage’s position and distance from the question as closely as the design permits. To test structure, change document boundaries or formatting while preserving the underlying content.</p><p>Each explanation predicts a different pattern. A positional account predicts a change when evidence moves within an otherwise fixed context. A length-based account predicts a decline as the input grows even when evidence remains easy to access. A structure-based account predicts a change when boundaries or formatting change without a corresponding change in content.</p><p>These effects may interact, so one experiment will not necessarily isolate them perfectly. The results should include separate measurements of passage selection, evidence interpretation, and final-answer accuracy. Otherwise, researchers may observe a performance change without knowing which part of evidence use changed.</p><h4>2. When does attention causally affect the answer?</h4><p>An attention pattern that correlates with accuracy may be a cause of failure, a consequence of other computations, or a useful marker of a deeper process.</p><p>Researchers could intervene on the heads or layers implicated by a positional-bias hypothesis and compare the results with matched controls. The key prediction should be selective: if the identified bias contributes to a particular class of failures, changing it should improve those cases in the predicted way, not merely alter attention weights or produce an undifferentiated change in accuracy.</p><p>The strongest evidence would connect three observations: the intervention changes the intended attention pattern, the targeted evidence becomes more effective, and the predicted errors improve relative to suitable controls. If attention changes without the expected behavioral effect, the explanation needs revision. If performance improves broadly, further experiments must establish whether the gain occurred through the proposed mechanism.</p><h4>3. Which improvements transfer beyond the task they were built for?</h4><p>Better passage selection does not guarantee better reasoning with the selected passage. A model may improve at fact lookup while continuing to struggle with contradictory evidence, multi-hop inference, or calculations that require combining facts.</p><p>Evaluation should therefore test unfamiliar tasks and different model families, using cases that separate selection from application. A method intended to improve localization should help on new retrieval tasks. A method intended to improve application should also help when the relevant evidence is already supplied but must be combined or used correctly.</p><p>If a method improves only the benchmark on which it was developed, the justified claim is narrow. General long-context robustness requires gains across different forms of evidence use, not just better results on one retrieval setup.</p><p>Together, these experiments would distinguish an input-level effect, test a proposed internal mechanism, and establish the scope of successful interventions. They would also make it harder to treat every improvement in final accuracy as evidence for the same explanation.</p><h3>8. A larger context window is not evidence of better evidence use</h3><p>The research points to several distinct limitations. Relevant information can become harder to use when its position changes. Document ordering can exploit positional attention preferences. Increasing the length of an input can impair performance even when ordinary retrieval difficulty has been reduced. Training and inference-time interventions mitigate some of these problems, but their gains depend on the task and method.</p><p>The practical implication is straightforward: a system’s context limit measures how much information it can accept, not how reliably it can use that information. Evaluating long-context systems therefore requires more than a final accuracy score. It requires tests that distinguish evidence availability, selection, interpretation, and application.</p><p>The unresolved question is not whether models can process long inputs. It is when additional context helps, when it interferes, and which intervention addresses the failure that actually occurred. Until evaluations distinguish those cases, a larger context window remains a measure of capacity not a dependable measure of evidence use.</p><h3>References</h3><ol><li>Liu, N. F., Lin, K., Hewitt, J., Paranjape, A., Bevilacqua, M., Petroni, F., and Liang, P. (2024). <a href="https://aclanthology.org/2024.tacl-1.9/"><em>Lost in the Middle: How Language Models Use Long Contexts</em></a>. <em>Transactions of the Association for Computational Linguistics</em>, 12, 157–173.</li><li>Hsieh, C.-Y., Chuang, Y.-S., Li, C.-L., Wang, Z., Le, L., Kumar, A., Glass, J., Ratner, A., Lee, C.-Y., Krishna, R., and Pfister, T. (2024). <a href="https://aclanthology.org/2024.findings-acl.890/"><em>Found in the Middle: Calibrating Positional Attention Bias Improves Long Context Utilization</em></a>. <em>Findings of the Association for Computational Linguistics: ACL 2024</em>, 14982–14995.</li><li>Yi, Z., Ling, Z., Zeng, D., Luo, H., Xu, Z., Liu, W., Luan, J., Cao, W., and Shen, Y. (2026). <a href="https://aclanthology.org/2026.acl-long.1198/"><em>Attention Basin: Why Contextual Position Matters in Large Language Models</em></a>. <em>Proceedings of the 64th Annual Meeting of the Association for Computational Linguistics</em>, 26086–26106.</li><li>Du, Y., Tian, M., Ronanki, S., Rongali, S., Bodapati, S. B., Galstyan, A., Wells, A., Schwartz, R., Huerta, E. A., and Peng, H. (2025). <a href="https://aclanthology.org/2025.findings-emnlp.1264/"><em>Context Length Alone Hurts LLM Performance Despite Perfect Retrieval</em></a>. <em>Findings of the Association for Computational Linguistics: EMNLP 2025</em>, 23281–23298.</li><li>He, J., Pan, K., Dong, X., Song, Z., Liu, Y., Sun, Q., Liang, Y., Wang, H., Zhang, E., and Zhang, J. (2024). <a href="https://aclanthology.org/2024.acl-long.736/"><em>Never Lost in the Middle: Mastering Long-Context Question Answering with Position-Agnostic Decompositional Training</em></a>. <em>Proceedings of the 62nd Annual Meeting of the Association for Computational Linguistics</em>, 13628–13642.</li></ol><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6dc65ec42806" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>