Emulating Retrieval Augmented Generation via Prompt Engineering for Enhanced Long Context Comprehension in LLMs
On the map: LLM reasoning → Reasoning benchmarks and evaluation
also in 1 more
Abstract (arXiv)
This paper addresses the challenge of comprehending very long contexts in Large Language Models (LLMs) by proposing a method that emulates Retrieval Augmented Generation (RAG) through specialized prompt engineering and chain-of-thought (CoT) reasoning. While recent LLMs support over 100,000 tokens in a single prompt, simply enlarging context windows has not guaranteed robust multi-hop reasoning when key details are scattered across massive input. Our approach treats the model as both the retriever and the reasoner: it first tags relevant segments within a long passage, then employs a stepwise CoT workflow to integrate these pieces of evidence. This single-pass method thereby reduces reliance on an external retriever, yet maintains focus on crucial segments. We evaluate our approach on selected tasks from BABILong, which interleaves standard bAbI QA problems with large amounts of distractor text. Compared to baseline (no retrieval) and naive RAG pipelines, our approach more accurately handles multi-fact questions such as object location tracking, counting, and indefinite knowledge. Furthermore, we analyze how prompt structure, including the order of question, relevant-text tags, and overall instructions, significantly affects performance. These findings underscore that optimized prompt engineering, combined with guided reasoning, can enhance LLMs' long-context comprehension and serve as a lightweight alternative to traditional retrieval pipelines.
Key facts. Cited by 9 papers in the map (data through 14 Oct 2026). Placed in Reasoning benchmarks and evaluation, one of 17 directions in LLM reasoning. Builds on 16 of its 17 references that are in the map. First posted on arXiv 18 Feb 2025.
Builds on
16 of 17 references.
Closest ancestors · 2
Same direction, newest first
- 2024BABILong: Testing the Limits of LLMs with Long Context Reasoning-in-a-Haystack14 Jun
- 2024Same Task, More Tokens: the Impact of Input Length on the Reasoning Performance of Large Language Models19 Feb
Other references · 14
- 2022Chain-of-Thought Prompting Elicits Reasoning in Large Language Modelscited by 12,459
- 2024Gemini 1.5: Unlocking multimodal understanding across millions of tokens of contextcited by 3,224
- 2023LongBench: A Bilingual, Multitask Benchmark for Long Context Understandingcited by 1,417
- 2024∞Bench: Extending Long Context Evaluation Beyond 100K Tokenscited by 367
- 2024Many-Shot In-Context Learningcited by 206
- 2022SCROLLS: Standardized CompaRison Over Long Language Sequencescited by 170
- 2024One Thousand and One Pairs: A "novel" challenge for long-context language modelscited by 80
- 2022An Empirical Survey on Long Document Summarization: Datasets, Models and Metricscited by 74
- 2024DocFinQA: A Long-Context Financial Reasoning Datasetcited by 60
- 2024Can Long-Context Language Models Subsume Retrieval, RAG, SQL, and More?cited by 56
- 2024Multimodal Needle in a Haystack: Benchmarking Long-Context Capability of Multimodal Large Language Modelscited by 55
- 2024LongHealth: A Question Answering Benchmark with Long Clinical Documentscited by 33
Built on by
Citing papers per year: 2025: 5; 2026: 4.
9 papers.
- 2026Gated Differentiable Working Memory for Long-Context Language Modelingcited by 6
- 2025Reflexive Prompt Engineering: A Framework for Responsible Prompt Engineering and Interaction Designcited by 2
- 2025An Agile Method for Implementing Retrieval Augmented Generation Tools in Industrial SMEscited by 2
- 2025Retrieval-Augmented Generation for Electrocardiogram-Language Modelscited by 2
- 2025MPCAR: Multi-Perspective Contextual Augmentation for Enhanced Visual Reasoning in Large Vision-Language Modelscited by 1
- 2026A Study on the Impact of Fault localization Granularity for Repository-Scale Code Repair Taskscited by 1
- 2026RAG-Enhanced Large Language Models for Dynamic Content Expiration Prediction in Web Searchcited by 1
- 2025PaceLLM: Brain-Inspired Large Language Models for Long-Context Understandingcited by 0
- 2026FLARE: Few-shot Learning-based Adaptive Reflective Enginecited by 0
- 2026FLARE: Few-shot Learning-based Adaptive Reflective Engine3 Aug 2026
- 2026RAG-Enhanced Large Language Models for Dynamic Content Expiration Prediction in Web Search13 May 2026
- 2026A Study on the Impact of Fault localization Granularity for Repository-Scale Code Repair Tasks31 Mar 2026
- 2026Gated Differentiable Working Memory for Long-Context Language Modeling19 Jan 2026
- 2025Retrieval-Augmented Generation for Electrocardiogram-Language Models30 Sep 2025
- 2025An Agile Method for Implementing Retrieval Augmented Generation Tools in Industrial SMEs28 Aug 2025
- 2025MPCAR: Multi-Perspective Contextual Augmentation for Enhanced Visual Reasoning in Large Vision-Language Models17 Aug 2025
- 2025PaceLLM: Brain-Inspired Large Language Models for Long-Context Understanding18 Jun 2025
- 2025Reflexive Prompt Engineering: A Framework for Responsible Prompt Engineering and Interaction Design22 Apr 2025
Similar, not cited
Close in wording, no citation either way
- 2024LongRAG: A Dual-Perspective Retrieval-Augmented Generation Paradigm for Long-Context Question Answering
- 2025Infinite Retrieval: Attention Enhanced LLMs in Long-Context Processing
- 2024Long-Context LLMs Meet RAG: Overcoming Challenges for Long Inputs in RAG
- 2024Retrieval Meets Reasoning: Dynamic In-Context Editing for Long-Text Understanding
- 2024Leave No Document Behind: Benchmarking Long-Context LLMs with Extended Multi-Doc QA
- 2025Tagging-Augmented Generation: Assisting Language Models in Finding Intricate Knowledge In Long Contexts
- 2025Retrieval Augmented Question Answering: When Should LLMs Admit Ignorance?
- 2025Grounding Long-Context Reasoning with Contextual Normalization for Retrieval-Augmented Generation