Skip to main content
QUICK REVIEW

[论文解读] FIT-RAG: Black-Box RAG with Factual Information and Token Reduction

Yuren Mao, Xuemei Dong|arXiv (Cornell University)|Mar 21, 2024
Handwritten Text Recognition Techniques被引用 4
一句话总结

FIT-RAG 是一种黑箱检索增强生成框架,通过在检索过程中联合利用事实信息和大语言模型(LLM)偏好,同时通过子文档级别剪枝和自我知识识别减少输入 token 数量,从而提升大语言模型的有效性和效率。该方法在 PopQA 数据集上将 Llama2-13B-Chat 的准确率最高提升 27.5%,在所有数据集中输入 token 数量最多减少 49%。

ABSTRACT

Due to the extraordinarily large number of parameters, fine-tuning Large Language Models (LLMs) to update long-tail or out-of-date knowledge is impractical in lots of applications. To avoid fine-tuning, we can alternatively treat a LLM as a black-box (i.e., freeze the parameters of the LLM) and augment it with a Retrieval-Augmented Generation (RAG) system, namely black-box RAG. Recently, black-box RAG has achieved success in knowledge-intensive tasks and has gained much attention. Existing black-box RAG methods typically fine-tune the retriever to cater to LLMs' preferences and concatenate all the retrieved documents as the input, which suffers from two issues: (1) Ignorance of Factual Information. The LLM preferred documents may not contain the factual information for the given question, which can mislead the retriever and hurt the effectiveness of black-box RAG; (2) Waste of Tokens. Simply concatenating all the retrieved documents brings large amounts of unnecessary tokens for LLMs, which degenerates the efficiency of black-box RAG. To address these issues, this paper proposes a novel black-box RAG framework which utilizes the factual information in the retrieval and reduces the number of tokens for augmentation, dubbed FIT-RAG. FIT-RAG utilizes the factual information by constructing a bi-label document scorer. Besides, it reduces the tokens by introducing a self-knowledge recognizer and a sub-document-level token reducer. FIT-RAG achieves both superior effectiveness and efficiency, which is validated by extensive experiments across three open-domain question-answering datasets: TriviaQA, NQ and PopQA. FIT-RAG can improve the answering accuracy of Llama2-13B-Chat by 14.3\% on TriviaQA, 19.9\% on NQ and 27.5\% on PopQA, respectively. Furthermore, it can save approximately half of the tokens on average across the three datasets.

研究动机与目标

  • 解决现有黑箱 RAG 系统在检索过程中忽略事实信息以及通过完整文档拼接造成 token 浪费的局限性。
  • 通过在检索过程中引入事实相关性和 LLM 偏好作为双重标签,提升检索有效性。
  • 通过自我知识识别和子文档级别 token 减少,降低输入增强的 token 数量,提升 token 效率。
  • 在知识密集型问答任务中,实现答案准确率与计算效率之间的平衡权衡。
  • 使黑箱 RAG 在计算资源有限且 token 限制严格的现实应用场景中具备实际可部署性。

提出的方法

  • 提出一种双标签文档评分器,在检索过程中使用两个独立标签,联合优化事实相关性和 LLM 偏好。
  • 引入自我知识识别器,检测 LLM 是否无需外部检索即可回答问题,从而避免不必要的输入增强。
  • 采用子文档级别的 token 减少机制,基于分数聚合与过滤,仅选择最相关的子文档。
  • 使用复杂的提示模板,鼓励模型进行推理与解释,从而提升在检索到的知识上的 LLM 表现。
  • 采用检索策略:基于双标签评分器的综合得分选择 top-k 文档,并仅对最相关的子文档应用 token 减少。
  • 采用两阶段流程:第一阶段检索候选文档;第二阶段应用子文档过滤与 token 减少,再将结果输入 LLM。

实验结果

研究问题

  • RQ1如何有效将事实信息整合到黑箱 RAG 的检索过程中,以提升答案准确率?
  • RQ2在黑箱 RAG 中,不牺牲检索有效性的情况下,最多能实现多大程度的 token 减少?
  • RQ3在 token 减少流水线中,输入文档的最优数量是多少,才能在准确率与效率之间实现最佳平衡?
  • RQ4提示设计如何影响输入 token 减少后的黑箱 RAG 性能?
  • RQ5自我知识识别器能否有效避免黑箱 RAG 中不必要的检索与输入增强?

主要发现

  • FIT-RAG 在 TriviaQA 上将 Llama2-13B-Chat 的回答准确率提升 14.3%,在 NQ 上提升 19.9%,在 PopQA 上提升 27.5%,展现出卓越的有效性。
  • 该方法在 TriviaQA 上减少 49% 的输入 token,NQ 上减少 37%,PopQA 上减少 49%,实现了显著的效率提升。
  • 使用 10 个输入文档进行 token 减少时,准确率与 token 减少之间达到最佳平衡,超过此数量后性能开始下降。
  • 综合提示模板相比简单提示和思维链(CoT)提示,分别在准确率上提升 2.7% 和 1.5%,证明其有效性。
  • 自我知识识别器成功识别出无需外部检索的场景,有效减少了不必要的输入增强。
  • 双标签文档评分器能有效平衡事实相关性与 LLM 偏好,防止检索到误导性或无关的文档。

更好的研究,从现在开始

从阅读论文到最终审阅,大幅缩短您的研究时间。

无需绑定信用卡

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