ECoRAG:基于证据性指导的长上下文RAG压缩技术
ECoRAG: Evidentiality-guided Compression for Long Context RAG
June 5, 2025
作者: Yeonseok Jeong, Jinsu Kim, Dohyeon Lee, Seung-won Hwang
cs.AI
摘要
大型语言模型(LLMs)在开放域问答(ODQA)任务中,通过检索增强生成(RAG)技术利用外部文档,展现了卓越的性能。为降低RAG在处理较长上下文时的开销,上下文压缩成为必要。然而,先前的压缩方法未能专注于滤除非证据性信息,这限制了基于LLM的RAG性能。因此,我们提出了证据导向的RAG,即ECoRAG框架。ECoRAG通过依据证据性对检索到的文档进行压缩,确保答案生成得到正确证据的支持,从而提升LLM性能。作为额外步骤,ECoRAG评估压缩内容是否提供了充分证据,若不足,则继续检索直至满足条件。实验表明,ECoRAG在ODQA任务上提升了LLM的表现,超越了现有的压缩方法。此外,ECoRAG具有极高的成本效益,不仅减少了延迟,还通过仅保留生成正确答案所需的信息,最小化了令牌使用量。代码可在https://github.com/ldilab/ECoRAG获取。
English
Large Language Models (LLMs) have shown remarkable performance in Open-Domain
Question Answering (ODQA) by leveraging external documents through
Retrieval-Augmented Generation (RAG). To reduce RAG overhead, from longer
context, context compression is necessary. However, prior compression methods
do not focus on filtering out non-evidential information, which limit the
performance in LLM-based RAG. We thus propose Evidentiality-guided RAG, or
ECoRAG framework. ECoRAG improves LLM performance by compressing retrieved
documents based on evidentiality, ensuring whether answer generation is
supported by the correct evidence. As an additional step, ECoRAG reflects
whether the compressed content provides sufficient evidence, and if not,
retrieves more until sufficient. Experiments show that ECoRAG improves LLM
performance on ODQA tasks, outperforming existing compression methods.
Furthermore, ECoRAG is highly cost-efficient, as it not only reduces latency
but also minimizes token usage by retaining only the necessary information to
generate the correct answer. Code is available at
https://github.com/ldilab/ECoRAG.