Query Rewriting for Retrieval-Augmented Large Language Models

https://papers.cool/arxiv/2305.14283

Authors: Xinbei Ma ; Yeyun Gong ; Pengcheng He ; Hai Zhao ; Nan Duan

Summary: Large Language Models (LLMs) play powerful, black-box readers in the retrieve-then-read pipeline, making remarkable progress in knowledge-intensive tasks. This work introduces a new framework, Rewrite-Retrieve-Read instead of the previous retrieve-then-read for the retrieval-augmented LLMs from the perspective of the query rewriting. Unlike prior studies focusing on adapting either the retriever or the reader, our approach pays attention to the adaptation of the search query itself, for there is inevitably a gap between the input text and the needed knowledge in retrieval. We first prompt an LLM to generate the query, then use a web search engine to retrieve contexts. Furthermore, to better align the query to the frozen modules, we propose a trainable scheme for our pipeline. A small language model is adopted as a trainable rewriter to cater to the black-box LLM reader. The rewriter is trained using the feedback of the LLM reader by reinforcement learning. Evaluation is conducted on downstream tasks, open-domain QA and multiple-choice QA. Experiments results show consistent performance improvement, indicating that our framework is proven effective and scalable, and brings a new framework for retrieval-augmented LLM.


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

A: 这篇论文试图解决的问题是如何提高检索增强型大型语言模型(LLMs)在知识密集型任务中的性能。具体来说,它关注于以下几个方面:

  1. 查询重写(Query Rewriting):论文指出,在检索增强型LLMs的“检索然后阅读”(retrieve-then-read)流程中,输入文本与实际需要检索的知识之间存在差距。为了解决这个问题,论文提出了一个新的框架“重写-检索-阅读”(Rewrite-Retrieve-Read),在检索器之前增加了一个查询重写步骤,以更好地适应检索需求。
  2. 适应性训练(Adaptation Training):为了使查询重写更好地适应冻结的检索器和LLM阅读器,论文提出了一个可训练的方案,即使用一个小的、可训练的语言模型作为可训练的重写器(trainable rewriter)。这个重写器通过强化学习(reinforcement learning)进行训练,以提高下游任务的性能。
  3. 性能提升(Performance Improvement):通过在开放域问答(open-domain QA)和多项选择问答(multiple-choice QA)等下游任务上的实验,论文展示了查询重写框架的有效性和可扩展性,表明该框架能够一致性地提高检索增强型LLM的性能。
  4. 资源消耗(Resource Consumption):论文还探讨了如何通过使用较小的语言模型来实现查询重写,以减少资源消耗,同时保持或提高性能。

总的来说,这篇论文旨在通过引入查询重写步骤和可训练的重写器,来解决检索增强型LLMs在知识检索和理解方面的局限性,从而提高其在实际应用中的可靠性和实用性。


Q: 有哪些相关研究?

A: 这篇论文提到了多个与检索增强型大型语言模型(LLMs)相关的研究领域,主要包括以下几个方面:

  1. 检索增强(Retrieval Augmentation):研究如何将外部知识(非参数知识)与内部知识(参数知识)结合起来,以减轻LLMs在生成内容时可能出现的事实错误(hallucination)问题,特别是在知识密集型任务中。
  2. 与黑盒LLMs的协作(Cooperation with Black-box LLMs):探讨如何通过精心设计的提示(prompts)或复杂的提示流程来触发LLMs的潜在能力,以及如何通过在LLM前后添加可训练的小模型来优化性能。
  3. 检索器与阅读器的交互(Interactions between Retriever and Reader):研究如何设计检索器和阅读器之间的交互,以便LLMs能够逐步接近正确答案。
  4. 检索增强的端到端系统(End-to-End Systems with Retrieval Augmentation):早期研究使用稀疏或密集检索器与预训练语言模型(PrLM)结合,形成可调优的端到端系统。
  5. 互联网作为知识库(The Internet as a Knowledge Base):研究如何利用互联网搜索引擎作为检索器,利用互联网作为知识源来增强LLMs。