mlsanityData to 14 Oct 2026

Emulating Retrieval Augmented Generation via Prompt Engineering for Enhanced Long Context Comprehension in LLMs

arXiv 2502.12462 ↗First posted 18 Feb 2025cs.CLcited by 9

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

  1. 2024BABILong: Testing the Limits of LLMs with Long Context Reasoning-in-a-Haystack14 Jun
  2. 2024Same Task, More Tokens: the Impact of Input Length on the Reasoning Performance of Large Language Models19 Feb

Other references · 14

  1. 2022Chain-of-Thought Prompting Elicits Reasoning in Large Language Modelscited by 12,459
  2. 2024Gemini 1.5: Unlocking multimodal understanding across millions of tokens of contextcited by 3,224
  3. 2023LongBench: A Bilingual, Multitask Benchmark for Long Context Understandingcited by 1,417
  4. 2024∞Bench: Extending Long Context Evaluation Beyond 100K Tokenscited by 367
  5. 2024Many-Shot In-Context Learningcited by 206
  6. 2022SCROLLS: Standardized CompaRison Over Long Language Sequencescited by 170
  7. 2024One Thousand and One Pairs: A "novel" challenge for long-context language modelscited by 80
  8. 2022An Empirical Survey on Long Document Summarization: Datasets, Models and Metricscited by 74
  9. 2024DocFinQA: A Long-Context Financial Reasoning Datasetcited by 60
  10. 2024Can Long-Context Language Models Subsume Retrieval, RAG, SQL, and More?cited by 56
  11. 2024Multimodal Needle in a Haystack: Benchmarking Long-Context Capability of Multimodal Large Language Modelscited by 55
  12. 2024LongHealth: A Question Answering Benchmark with Long Clinical Documentscited by 33
2 more
  1. 2024NovelQA: Benchmarking Question Answering on Documents Exceeding 200K Tokenscited by 32
  2. 2024CLongEval: A Chinese Benchmark for Evaluating Long-Context Large Language Modelscited by 15

Built on by

Cited by year (2026 to 14 Oct)

Citing papers per year: 2025: 5; 2026: 4.

9 papers.

Similar, not cited

Close in wording, no citation either way

  1. 2024LongRAG: A Dual-Perspective Retrieval-Augmented Generation Paradigm for Long-Context Question Answering
  2. 2025Infinite Retrieval: Attention Enhanced LLMs in Long-Context Processing
  3. 2024Long-Context LLMs Meet RAG: Overcoming Challenges for Long Inputs in RAG
  4. 2024Retrieval Meets Reasoning: Dynamic In-Context Editing for Long-Text Understanding
  5. 2024Leave No Document Behind: Benchmarking Long-Context LLMs with Extended Multi-Doc QA
  6. 2025Tagging-Augmented Generation: Assisting Language Models in Finding Intricate Knowledge In Long Contexts
  7. 2025Retrieval Augmented Question Answering: When Should LLMs Admit Ignorance?
  8. 2025Grounding Long-Context Reasoning with Contextual Normalization for Retrieval-Augmented Generation