Table of Contents
Fetching ...

R^2AG: Incorporating Retrieval Information into Retrieval Augmented Generation

Fuda Ye, Shuangyin Li, Yongqi Zhang, Lei Chen

TL;DR

R$^2$AG is proposed, a novel enhanced RAG framework to fill the semantic gap between LLMs and retrievers and serves as an anchor to aid LLMs in the generation process, thereby filling the semantic gap.

Abstract

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.

R^2AG: Incorporating Retrieval Information into Retrieval Augmented Generation

TL;DR

RAG is proposed, a novel enhanced RAG framework to fill the semantic gap between LLMs and retrievers and serves as an anchor to aid LLMs in the generation process, thereby filling the semantic gap.

Abstract

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 RAG, a novel enhanced RAG framework to fill this gap by incorporating Retrieval information into Retrieval Augmented Generation. Specifically, RAG utilizes the nuanced features from the retrievers and employs a R-Former to capture retrieval information. Then, a retrieval-aware prompting strategy is designed to integrate retrieval information into LLMs' generation. Notably, RAG suits low-source scenarios where LLMs and retrievers are frozen. Extensive experiments across five datasets validate the effectiveness, robustness, and efficiency of RAG. Our analysis reveals that retrieval information serves as an anchor to aid LLMs in the generation process, thereby filling the semantic gap.
Paper Structure (28 sections, 12 equations, 6 figures, 5 tables)

This paper contains 28 sections, 12 equations, 6 figures, 5 tables.

Figures (6)

  • Figure 1: A comparison between RAG and R$^2$AG. R$^2$AG employs a trainable R$^2$-Former to bridge the semantic gap between retrievers and LLMs. Optionally, LLMs can be fine-tuned to understand the retrieval information further.
  • Figure 2: An illustration of R$^2$AG. The R$^2$-Former is designed to extract retrieval features, acting as an information bottleneck between retrievers and LLMs. Through the retrieval-aware prompting strategy, the retrieval information serves as an anchor to guide LLMs during generation. "Emb" is short for embedding, "PE" stands for positional embeddings, and "<R>" denotes the placeholder for retrieval information.
  • Figure 3: Performance of learnable tokens across different document counts on NQ-10 dataset. "GT" means only retaining ground-true documents.
  • Figure 4: Performance comparison of R$^2$AG with various retrievers on NQ-10 dataset.
  • Figure 5: Performance of R$^2$AG$_{7B}$ and R$^2$AG$_{13B}$. Darker parts mean the difference values of R$^2$AG$_{13B}$.
  • ...and 1 more figures