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)在“检索-阅读”流水线中充当强大的黑盒阅读器,在知识密集型任务中取得了显著进展。本文从查询重写的视角,提出了一种名为“重写-检索-阅读”的新框架,以替代先前用于检索增强型LLMs的“检索-阅读”范式。与以往专注于适配检索器或阅读器的研究不同,我们的方法旨在适配搜索查询本身,因为输入文本与所需检索知识之间必然存在差距。我们首先提示LLM生成查询,继而使用网络搜索引擎检索上下文。此外,为使查询更好地适配固定模块,我们提出了一种可训练的流水线方案:采用小型语言模型作为可训练的查询重写器,以满足黑盒LLM阅读器的需求。该重写器通过强化学习,利用LLM阅读器的反馈进行训练。我们在开放域问答和多项选择问答等下游任务上进行了评估。实验结果显示性能持续提升,表明我们的框架有效且可扩展,并为检索增强型LLM提供了一种新范式。