[论文解读] Self-RAG: Learning to Retrieve, Generate, and Critique through Self-Reflection
Self-Rag 训练单个语言模型在需要时进行检索、生成,并通过反思令牌对自身输出进行评析,从而提高在各任务中的事实性和引证准确性。
Despite their remarkable capabilities, large language models (LLMs) often produce responses containing factual inaccuracies due to their sole reliance on the parametric knowledge they encapsulate. Retrieval-Augmented Generation (RAG), an ad hoc approach that augments LMs with retrieval of relevant knowledge, decreases such issues. However, indiscriminately retrieving and incorporating a fixed number of retrieved passages, regardless of whether retrieval is necessary, or passages are relevant, diminishes LM versatility or can lead to unhelpful response generation. We introduce a new framework called Self-Reflective Retrieval-Augmented Generation (Self-RAG) that enhances an LM's quality and factuality through retrieval and self-reflection. Our framework trains a single arbitrary LM that adaptively retrieves passages on-demand, and generates and reflects on retrieved passages and its own generations using special tokens, called reflection tokens. Generating reflection tokens makes the LM controllable during the inference phase, enabling it to tailor its behavior to diverse task requirements. Experiments show that Self-RAG (7B and 13B parameters) significantly outperforms state-of-the-art LLMs and retrieval-augmented models on a diverse set of tasks. Specifically, Self-RAG outperforms ChatGPT and retrieval-augmented Llama2-chat on Open-domain QA, reasoning and fact verification tasks, and it shows significant gains in improving factuality and citation accuracy for long-form generations relative to these models.
研究动机与目标
- 在不牺牲多功能性的前提下,提高LLM输出的事实准确性和可验证性。
- 实现按需检索,避免不必要或无关的上下文。
- 引入自我反思机制,对生成的段落进行基于事实性及来自检索段落的支持程度的评析与排序。
- 提供带有逐段验证信号的引文依据输出,以便于事实核验。
提出的方法
- 训练一个任意单一语言模型,在生成文本时使用指示检索需求的反思令牌,并评估自身输出。
- 使用按需检索,模型先决定是否检索,然后并行处理多段检索得到的文本。
- 引入四种反思/评析令牌类型(Retrieve、IsRel、IsSup、IsUse)以控制检索并评估相关性与支持度。
- 利用一个评议模型在离线将反思令牌插入训练数据,降低推理阶段对单独评议模型的依赖。
- 在包含检索文本和反思令牌的增广数据上,使用标准LM目标训练生成器。
- 在推理时通过分段级束搜索和结合反思令牌概率的加权分数,支持可定制的解码策略。

实验结果
研究问题
- RQ1一个LM能否学习实现按需检索,以在不损害多功能性的前提下提升生成质量?
- RQ2反思与评析令牌是否在长文本生成中提升事实性、可验证性和引证准确性?
- RQ3以反思令牌为引导的分段级重新排序如何影响检索频率与输出质量?
- RQ4Self-Rag 的按需检索与自我评析对来源归属与引文的影响是什么?
主要发现
- Self-Rag 在多样化任务上显著优于最先进的LLM及检索增强模型。
- Self-Rag 在开放域问答、推理和事实核验任务上优于 ChatGPT 与检索增强的 Llama2-chat。
- 与这些模型相比,Self-Rag 在长文生成的事实性与引文准确性上取得显著提升。
- 推理时的反思令牌使行为可控,能够调整检索频率和面向任务的目标。
- 使用离线插入的评析令牌进行训练,减少推理阶段对外部奖励模型的依赖并降低训练成本。

阅读本论文
在 Nubint 阅读器中打开原文,边读边就任意段落提问。
在 Nubint 中阅读本论文本解读由 AI 根据论文原文生成,引用前请核对原文。