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: https://github.com/starsuzi/Adaptive-RAG.
翻译:检索增强的大语言模型通过将外部知识库中的非参数化知识融入大语言模型,在问答等多项任务中展现出提升响应准确性的显著潜力。然而,现有处理不同复杂度查询的方法存在明显局限:简单查询被施加不必要的计算开销,复杂多步查询又难以充分应对——实际上,用户请求并非局限于简单或复杂的单一类别。本文提出一种新颖的自适应问答框架,能够基于查询复杂度动态选择从最简到最复杂的检索增强大语言模型最优策略。该选择过程通过分类器实现:该分类器由更小规模的语言模型构成,利用自动收集的标签(源自模型实际预测结果与数据集固有归纳偏置)训练,可预测输入查询的复杂度级别。该方法提供了一种均衡策略,能根据查询复杂度灵活适配迭代式与单步检索增强大语言模型及无检索方法。我们在包含多复杂度查询的开域问答数据集上验证了模型性能,结果表明与包括自适应检索方法在内的相关基线相比,本方法显著提升了问答系统的整体效率与准确性。代码已开源:https://github.com/starsuzi/Adaptive-RAG。