Can't Remember Details in Long Documents? You Need Some R&R
Not on the map. Why?
Abstract (arXiv)
Long-context large language models (LLMs) hold promise for tasks such as question-answering (QA) over long documents, but they tend to miss important information in the middle of context documents (arXiv:2307.03172v3). Here, we introduce textitR&R -- a combination of two novel prompt-based methods called textitreprompting and textitin-context retrieval (ICR) -- to alleviate this effect in document-based QA. In reprompting, we repeat the prompt instructions periodically throughout the context document to remind the LLM of its original task. In ICR, rather than instructing the LLM to answer the question directly, we instruct it to retrieve the top k passage numbers most relevant to the given question, which are then used as an abbreviated context in a second QA prompt. We test R&R with GPT-4 Turbo and Claude-2.1 on documents up to 80k tokens in length and observe a 16-point boost in QA accuracy on average. Our further analysis suggests that R&R improves performance on long document-based QA because it reduces the distance between relevant context and the instructions. Finally, we show that compared to short-context chunkwise methods, R&R enables the use of larger chunks that cost fewer LLM calls and output tokens, while minimizing the drop in accuracy.
Key facts. Cited by 10 papers in the map (data through 7 Oct 2026). Builds on 16 of its 25 references that are in the map. First posted on arXiv 8 Mar 2024.
Builds on
16 of 25 references.
References · 16
- 2023GPT-4 Technical Reportcited by 18,132
- 2020Retrieval-Augmented Generation for Knowledge-Intensive NLP Taskscited by 9,160
- 2021RoFormer: Enhanced Transformer with Rotary Position Embeddingcited by 4,581
- 2018HotpotQA: A Dataset for Diverse, Explainable Multi-hop Question Answeringcited by 3,686
- 2023Lost in the Middle: How Language Models Use Long Contextscited by 3,383
- 2019The Curious Case of Neural Text Degenerationcited by 2,881
- 2018Know What You Don't Know: Unanswerable Questions for SQuADcited by 1,538
- 2023Extending Context Window of Large Language Models via Positional Interpolationcited by 721
- 2020Recipes for building an open-domain chatbotcited by 593
- 2019Neural Text Generation with Unlikelihood Trainingcited by 489
- 2020Pretrained Transformers for Text Ranking: BERT and Beyondcited by 266
- 2023Landmark Attention: Random-Access Infinite Context Length for Transformerscited by 206
4 more
- 2024A Human-Inspired Reading Agent with Gist Memory of Very Long Contextscited by 140
- 2023Walking Down the Memory Maze: Beyond Context Limit through Interactive Readingcited by 129
- 2023System 2 Attention (is something you might need too)cited by 85
- 2023PEARL: Prompting Large Language Models to Plan and Execute Actions Over Long Documentscited by 61
Built on by
Citing papers per year: 2024: 6; 2025: 2; 2026: 2.
10 papers.
- 2024RepoQA: Evaluating Long Context Code Understandingcited by 35
- 2024DAPE: Data-Adaptive Positional Encoding for Length Extrapolationcited by 30
- 2025A Survey of Data Agents: Emerging Paradigm or Overstated Hype?cited by 30
- 2024Attribute or Abstain: Large Language Models as Long Document Assistantscited by 10
- 2024DAPE V2: Process Attention Score as Feature Map for Length Extrapolationcited by 10
- 2024MDCure: A Scalable Pipeline for Multi-Document Instruction-Followingcited by 10
- 2025CAFE: Retrieval Head-based Coarse-to-Fine Information Seeking to Enhance Multi-Document QA Capabilitycited by 4
- 2026Classifier Context Rot: Monitor Performance Degrades with Context Lengthcited by 2
- 2024Discourse Features Enhance Detection of Document-Level Machine-Generated Contentcited by 1
- 2026EASE-TTT: Evidence-Aligned Selective Test-Time Training for Long-Context Question Answeringcited by 0
- 2026EASE-TTT: Evidence-Aligned Selective Test-Time Training for Long-Context Question Answering5 Jun 2026
- 2026Classifier Context Rot: Monitor Performance Degrades with Context Length12 May 2026
- 2025A Survey of Data Agents: Emerging Paradigm or Overstated Hype?27 Oct 2025
- 2025CAFE: Retrieval Head-based Coarse-to-Fine Information Seeking to Enhance Multi-Document QA Capability15 May 2025
- 2024Discourse Features Enhance Detection of Document-Level Machine-Generated Content17 Dec 2024
- 2024MDCure: A Scalable Pipeline for Multi-Document Instruction-Following30 Oct 2024
- 2024DAPE V2: Process Attention Score as Feature Map for Length Extrapolation7 Oct 2024
- 2024Attribute or Abstain: Large Language Models as Long Document Assistants10 Jul 2024
- 2024RepoQA: Evaluating Long Context Code Understanding10 Jun 2024
- 2024DAPE: Data-Adaptive Positional Encoding for Length Extrapolation23 May 2024