Introduction
Large Language Models (LLMs) have demonstrated remarkable capabilities in various natural language tasks. However, their performance in multi-hop reasoning—where a model must synthesize information across multiple documents—remains highly sensitive to the relative order of those documents. This paper identifies the "misordered context problem" and introduces Context Repetition (CoRe), a simple yet effective prompting strategy to mitigate it.
The Misordered Context Problem
Standard decoder-only LLMs utilize causal attention, processing information strictly from left to right. In multi-hop scenarios, if a document containing a prerequisite (Document A) appears after the document that requires that information (Document B), the model often fails to establish the necessary logical link. In real-world Retrieval-Augmented Generation (RAG), documents are often returned in an arbitrary or relevance-ranked order that doesn't match the logical "reasoning chain," leading to significant performance degradation.
As illustrated above, when documents are presented in a "misleading" order, the model may conclude that the answer is not present, even if all necessary facts are in the prompt. This sensitivity to relative position is a significant hurdle for RAG systems.
Context Repetition (CoRe)
To address this, the authors propose Context Repetition (CoRe). The strategy involves concatenating the entire context block multiple times (typically 2 or 3) within the prompt.
Theoretically, if a task requires $k$ supporting documents, repeating the context $k$ times guarantees that the optimal reasoning sequence exists as a contiguous subsequence. In practice, repeating the context just once ($\hat{k}=2$) captures most performance gains. This approach allows the model's internal attention mechanism to "re-read" the information, effectively using the first pass to populate the KV cache with context that becomes "prior knowledge" for the second pass. To implement this naturally for instruction-tuned models, the authors use a chat template where the model is prompted: "Sure. Before answering the question, I'll reconsider the question and the documents once more," followed by the repeated context.
Experimental Results
The researchers evaluated CoRe across benchmarks like MuSiQue, HotpotQA, and 2WikiMultihopQA. The results show that document ordering creates a massive performance gap between "Worst" and "Best" cases.
As shown in the performance of Phi-3.5-mini-Instruct, the "Worst" case ordering leads to significantly lower accuracy compared to the "Best" case across 2-hop, 3-hop, and 4-hop tasks. CoRe effectively bridges this gap, boosting reasoning performance by up to 30% in F1 scores and 70% in accuracy for synthetic tasks. Notably, CoRe also flattens the "lost-in-the-middle" curve, making the model robust to where a document is placed within the overall prompt.
Conclusion
Context Repetition is a powerful "test-time scaling" method that enhances the multi-hop reasoning potential of LLMs without requiring model retraining. While it increases token costs and latency, its simplicity and compatibility with existing techniques like Chain-of-Thought make it a valuable tool for building more robust RAG systems. Future work may focus on selective repetition to optimize token usage while maintaining these reasoning gains.
Summary updated