Does RAG Really Perform Bad For Long-Context Processing?

Kun Luo, Zheng Liu, Peitian Zhang, Hongjin Qian, Jun Zhao +1 more
2/17/2025
cs.CL
rag

No confident code implementation found for this paper.

Abstract

The efficient processing of long context poses a serious challenge for large language models (LLMs). Recently, retrieval-augmented generation (RAG) has emerged as a promising strategy for this problem, as it enables LLMs to make selective use of the long context for efficient computation.

Show full abstract

However, existing RAG approaches lag behind other long-context processing methods due to inherent limitations on inaccurate retrieval and fragmented contexts. To address these challenges, we introduce RetroLM, a novel RAG framework for long-context processing. Unlike traditional methods, RetroLM employs KV-level retrieval augmentation, where it partitions the LLM's KV cache into contiguous pages and retrieves the most crucial ones for efficient computation. This approach enhances robustness to retrieval inaccuracy, facilitates effective utilization of fragmented contexts, and saves the cost from repeated computation. Building on this framework, we further develop a specialized retriever for precise retrieval of critical pages and conduct unsupervised post-training to optimize the model's ability to leverage retrieved information. We conduct comprehensive evaluations with a variety of benchmarks, including LongBench, InfiniteBench, and RULER, where RetroLM significantly outperforms existing long-context LLMs and efficient long-context processing methods, particularly in tasks requiring intensive reasoning or extremely long-context comprehension.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. Any repos shown below are weak matches — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{luo2025does,
  title  = {Does RAG Really Perform Bad For Long-Context Processing?},
  author = {Kun Luo and Zheng Liu and Peitian Zhang and Hongjin Qian and Jun Zhao and Kang Liu},
  year   = {2025},
  eprint = {2502.11444},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2502.11444v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2502.11444.svg)](https://codeofpaper.com/paper/2502.11444)

Discussion