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.
翻译:大型语言模型(LLMs)在检索-读取流程中扮演着强大的黑箱阅读器角色,在知识密集型任务中取得了显著进展。本研究从查询重写的角度出发,提出了一种新框架——重写-检索-读取(Rewrite-Retrieve-Read),以替代传统检索增强LLMs中的“先检索后读取”方法。不同于以往聚焦于适配检索器或阅读器的研究,我们的方法关注搜索查询本身的适配,因为输入文本与检索所需知识之间必然存在差距。我们首先提示LLM生成查询,然后利用网络搜索引擎检索上下文。此外,为使查询更好地适配固定模块,我们提出了一种可训练的流程方案:采用小型语言模型作为可训练的重写器,以适应黑箱LLM阅读器。该重写器通过强化学习利用LLM阅读器的反馈进行训练。评估在开放域问答和多项选择问答等下游任务上进行。实验结果表明性能持续提升,证明我们的框架既有效又可扩展,并为检索增强LLM提供了一种新框架。