Skip to main content
QUICK REVIEW

[论文解读] Searching for Best Practices in Retrieval-Augmented Generation

Xiaohua Wang, Zhenhua Wang|arXiv (Cornell University)|Jul 1, 2024
Recommender Systems and Techniques被引用 6
一句话总结

这篇论文系统性地研究构建检索增强生成(RAG)管道的最佳实践,评估组件选择在查询分类、分块、嵌入模型、向量数据库、检索方法、重新排序、重新打包、摘要以及生成器微调方面的影响,重点强调多模态检索和面向效率的配置。

ABSTRACT

Retrieval-augmented generation (RAG) techniques have proven to be effective in integrating up-to-date information, mitigating hallucinations, and enhancing response quality, particularly in specialized domains. While many RAG approaches have been proposed to enhance large language models through query-dependent retrievals, these approaches still suffer from their complex implementation and prolonged response times. Typically, a RAG workflow involves multiple processing steps, each of which can be executed in various ways. Here, we investigate existing RAG approaches and their potential combinations to identify optimal RAG practices. Through extensive experiments, we suggest several strategies for deploying RAG that balance both performance and efficiency. Moreover, we demonstrate that multimodal retrieval techniques can significantly enhance question-answering capabilities about visual inputs and accelerate the generation of multimodal content using a "retrieval as generation" strategy.

研究动机与目标

  • 通过广泛实验识别最佳的RAG工作流组件及其组合。
  • 提供全面的评估框架和数据集,用以在一般、领域特定和多模态任务中评估RAG性能。
  • 证明多模态检索能够提升对视觉输入的问答效果,并通过“检索即生成”的方法加速多模态内容生成。

提出的方法

  • 通过在代表性任务上的表现对每个RAG模块进行三步法候选方法选择。
  • 逐个消融以衡量各模块对整体RAG性能的贡献。
  • 经验性探索各种组合,优先考虑在不同情景下的性能或效率。
  • 评估使用多样化任务集(常识、事实核查、开放域问答、多跳问答、医学问答),指标包括 Faithfulness、Context Relevancy、Answer Relevancy、Answer Correctness。
Figure 1: Retrieval-augmented generation workflow. This study investigates the contribution of each component and provides insights into optimal RAG practices through extensive experimentation. The optional methods considered for each component are indicated in bold fonts, while the methods underlin
Figure 1: Retrieval-augmented generation workflow. This study investigates the contribution of each component and provides insights into optimal RAG practices through extensive experimentation. The optional methods considered for each component are indicated in bold fonts, while the methods underlin

实验结果

研究问题

  • RQ1对于RAG管道中的每个模块(查询分类、分块、嵌入、向量存储、检索、重新排序、重新打包、摘要以及生成器微调),哪些方法表现最佳?
  • RQ2各模块如何共同作用于总体RAG性能,哪些组合在准确性与效率之间实现最佳权衡?
  • RQ3多模态检索是否能够显著提升对可视输入的问答,并通过“检索即生成”策略加速多模态内容生成?

主要发现

方法TREC DL19 mAPTREC DL19 nDCG@10TREC DL19 R@50TREC DL19 R@1k延迟DL20 mAPDL20 nDCG@10DL20 R@50DL20 R@1k延迟
BM2530.1350.5838.3275.010.0728.5647.9646.1878.630.29
Contriever23.9944.5437.5474.593.0623.9842.1343.8175.390.98
LLM-Embedder44.6670.2049.0684.482.6145.6068.7661.3684.410.71
+ Query Rewriting44.5667.8951.4585.357.8045.1665.6259.6383.452.06
+ Query Decomposition41.9366.1048.6682.6214.9843.3064.9557.7484.182.01
+ HyDE50.8775.4454.9388.767.2150.9473.9463.8088.032.14
+ Hybrid Search47.1472.5051.1389.083.2047.7269.8064.3288.040.77
+ HyDE + Hybrid Search52.1373.3455.3890.4211.1653.1372.7266.1490.672.95
  • 将稀疏(BM25)与密集检索相结合的混合检索,结合基于 HyDE 的查询/文档转换,在合理延迟下实现了较强的性能。
  • 查询改写和查询分解在所评估的设置中不如 HyDE 或混合策略有效。
  • 在标准基准测试中,最佳整体RAG性能由 HyDE 加上 Hybrid Search 实现,使用 LLM-Embedder 嵌入和强重排序器(monoT5)。
  • 在生成器微调阶段,使用少量相关文档加随机选取文档的混合方式,相较于仅使用相关文档或随机文档,能提高鲁棒性和有效性。
  • 多模态检索显著提升对视觉输入的问答,并通过“检索即生成”方式加速多模态内容生成。
Figure 2: Classification of retrieval requirements for different tasks. In cases where information is not provided, we differentiate tasks based on the functions of the model.
Figure 2: Classification of retrieval requirements for different tasks. In cases where information is not provided, we differentiate tasks based on the functions of the model.

更好的研究,从现在开始

从论文设计到论文写作,大幅缩短您的研究时间。

无需绑定信用卡

本解读由 AI 生成,并经人工编辑审核。