Retrieval augmented generation (RAG) has been applied in many scenarios to augment large language models (LLMs) with external documents provided by retrievers. However, a semantic gap exists between LLMs and retrievers due to differences in their training objectives and architectures. This misalignment forces LLMs to passively accept the documents provided by the retrievers, leading to incomprehension in the generation process, where the LLMs are burdened with the task of distinguishing these documents using their inherent knowledge. This paper proposes R$^2$AG, a novel enhanced RAG framework to fill this gap by incorporating Retrieval information into Retrieval Augmented Generation. Specifically, R$^2$AG utilizes the nuanced features from the retrievers and employs a R$^2$-Former to capture retrieval information. Then, a retrieval-aware prompting strategy is designed to integrate retrieval information into LLMs' generation. Notably, R$^2$AG suits low-source scenarios where LLMs and retrievers are frozen. Extensive experiments across five datasets validate the effectiveness, robustness, and efficiency of R$^2$AG. Our analysis reveals that retrieval information serves as an anchor to aid LLMs in the generation process, thereby filling the semantic gap.
翻译:检索增强生成(RAG)已在许多场景中得到应用,通过检索器提供的外部文档来增强大语言模型(LLMs)。然而,由于训练目标和架构的差异,LLMs与检索器之间存在语义鸿沟。这种不对齐迫使LLMs被动接受检索器提供的文档,导致生成过程中的理解困难,即LLMs需依赖其固有知识来区分这些文档。本文提出R$^2$AG,一种新颖的增强型RAG框架,通过将检索信息融入检索增强生成来填补这一鸿沟。具体而言,R$^2$AG利用检索器的细微特征,并采用R$^2$-Former来捕获检索信息。随后,设计了一种检索感知提示策略,将检索信息整合到LLMs的生成过程中。值得注意的是,R$^2$AG适用于LLMs和检索器均被冻结的低资源场景。在五个数据集上的大量实验验证了R$^2$AG的有效性、鲁棒性和效率。我们的分析表明,检索信息可作为锚点辅助LLMs的生成过程,从而填补语义鸿沟。