Adaptive-RAG¶
韩国科学技术高等研究院 人工智能研究生院 计算学院
Retrieval-Augmented Large Language Models (LLMs), which incorporate the non-parametric knowledge from external knowledge bases into LLMs, have emerged as a promising approach to enhancing response accuracy in several tasks, such as Question-Answering (QA). However, even though there are various approaches dealing with queries of different complexities, they either handle simple queries with unnecessary computational overhead or fail to adequately address complex multi-step queries; yet, not all user requests fall into only one of the simple or complex categories. In this work, we propose a novel adaptive QA framework, that can dynamically select the most suitable strategy for (retrieval-augmented) LLMs from the simplest to the most sophisticated ones based on the query complexity. Also, this selection process is operationalized with a classifier, which is a smaller LM trained to predict the complexity level of incoming queries with automatically collected labels, obtained from actual predicted outcomes of models and inherent inductive biases in datasets. This approach offers a balanced strategy, seamlessly adapting between the iterative and single-step retrieval-augmented LLMs, as well as the no-retrieval methods, in response to a range of query complexities. We validate our model on a set of open-domain QA datasets, covering multiple query complexities, and show that ours enhances the overall efficiency and accuracy of QA systems, compared to relevant baselines including the adaptive retrieval approaches. Code is available at: this https URL.
检索增强大型语言模型 (LLMsRetrieval-Augmented Large Language Models) 将来自外部知识库的非参数知识整合到 LLMs中,已成为一种有前途的方法,可以提高问答 (QA) 等多项任务的响应准确性。然而,尽管有各种方法可以处理不同复杂性的查询,但它们要么处理具有不必要计算开销的简单查询,要么无法充分解决复杂的多步骤查询;然而,并非所有用户请求都只属于简单或复杂类别之一。在这项工作中,我们提出了一种新颖的自适应QA框架,该框架可以根据查询复杂度LLMs从最简单到最复杂的策略动态选择最合适的策略(检索-增强)。此外,此选择过程通过分类器进行操作,分类器是一个较小的 LM,经过训练,用于预测具有自动收集标签的传入查询的复杂程度,这些标签是从模型的实际预测结果和数据集中固有的归纳偏差中获得的。这种方法提供了一种平衡的策略,在迭代和单步检索增强LLMs方法以及无检索方法之间无缝适应,以响应一系列查询复杂性。我们在一组开放域 QA 数据集上验证了我们的模型,涵盖了多个查询复杂性,并表明与相关基线(包括自适应检索方法)相比,我们的模型提高了 QA 系统的整体效率和准确性。代码可在以下位置获得:此 https URL。
备注
可以参考 RAG
中 Adaptive-RAG
的介绍