Self-RAG: Learning to Retrieve, Generate, and Critique through Self-Reflection

https://papers.cool/arxiv/2310.11511

Authors: Akari Asai ; Zeqiu Wu ; Yizhong Wang ; Avirup Sil ; Hannaneh Hajishirzi

Summary: 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.


Q: 这篇论文试图解决什么问题?

A: 这篇论文试图解决大型语言模型(LLMs)在生成响应时经常包含事实不准确的问题。尽管LLMs在许多任务上表现出色,但它们依赖于模型内部的参数知识,这可能导致在知识密集型任务中产生错误。为了解决这个问题,论文提出了一种新的框架,名为Self-Reflective Retrieval-Augmented Generation(SELF-RAG),旨在通过检索和自我反思来提高LLMs生成文本的质量和事实准确性。

SELF-RAG的核心思想是训练一个单一的任意LLM,使其能够按需检索相关段落,并使用特殊的反射标记(reflection tokens)来生成和反思检索到的段落以及自身的生成内容。这种自我反思的过程使得LLM在推理阶段可控,能够根据不同任务的需求调整其行为。通过这种方式,SELF-RAG能够在保持LLM的创造性和多样性的同时,提高其生成内容的事实准确性和可验证性。


Q: 有哪些相关研究?

A: 这篇论文提到了多个与SELF-RAG相关的研究领域和具体工作,主要包括以下几个方面:

  1. 检索增强生成(Retrieval-Augmented Generation, RAG):RAG方法通过在LLMs的输入中加入检索到的相关文本段落来减少知识密集型任务中的事实错误。SELF-RAG在RAG的基础上进行了改进,通过自我反思机制来更智能地决定何时进行检索以及如何利用检索到的信息。
  2. 并行RAG工作(Concurrent RAG work):一些并行工作提出了新的训练或提示策略来改进RAG方法。例如,Lin等人(2023)通过两步微调策略来改进RAG,而Yoran等人(2023)和Xu等人(2023)则使用自然语言推理模型和摘要模型来过滤或压缩检索到的段落。
  3. 训练和生成与批评者(Training and generating with critics):一些研究使用强化学习(如PPO)从人类反馈中训练LLMs,以使模型与人类偏好对齐。SELF-RAG则通过在训练阶段使用批评者模型来生成反思标记,从而在推理阶段实现可控生成。
  4. LLM精炼(LLM refinement):一些工作通过迭代提示模型生成任务输出、自然语言反馈和精炼任务输出来提高模型性能,但这种方法可能会牺牲推理效率。
  5. 检索增强的LLMs:论文还比较了SELF-RAG与使用检索增强的LLMs(如ChatGPT和Llama2-chat)的性能,展示了SELF-RAG在多个任务上的优势。
  6. 自我评估引导的解码框架(Self-evaluation-guided decoding framework):Xie等人(2023)提出了一个自我评估引导的解码框架,但主要集中在推理任务上,而SELF-RAG则在更广泛的任务上应用了自我反思机制。

这些相关工作为SELF-RAG提供了理论基础和实践背景,SELF-RAG在此基础上通过引入自我反思和按需检索的概念,提出了一种新的提高LLMs生成质量的方法。


Q: 论文如何解决这个问题?