arXiv:2505.23052cs.CL2025-05NeurIPS被引 12

让检索增强模型自动选最合适的回答者,提升问答准确率。

RAGRouter: Learning to Route Queries to Multiple Retrieval-Augmented Language Models

  • 用文档嵌入和模型能力嵌入动态判断哪个模型最适合当前问题。
  • 在多个任务上超越单个模型和现有路由方法,最高提升12.3%准确率。
  • 适合需要高精度、多模型协同的智能问答系统开发者。

检索增强生成(RAG)显著提升了大语言模型(LLM)在知识密集型任务上的表现。然而,不同LLM在RAG下的响应质量差异较大,需通过专用路由器从多个检索增强的LLM中为每条查询选择最优模型。我们观察到外部文档会动态影响LLM的回答能力,而现有路由方法依赖静态参数化知识表示,在RAG场景中表现不佳。为此,我们正式定义了新的检索增强LLM路由问题,将检索文档的影响纳入路由框架。提出RAGRouter,一种感知RAG特性的路由设计,利用文档嵌入与RAG能力嵌入,结合对比学习捕捉知识表示变化,实现更明智的路由决策。在多种知识密集型任务和检索设置下的广泛实验表明,RAGRouter优于最佳单个LLM及现有路由方法。通过扩展的分数阈值机制,其在低延迟约束下也展现出优异的性能-效率权衡。代码与数据已开源:https://github.com/OwwO99/RAGRouter。

原文摘要 · Abstract (English)

Retrieval-Augmented Generation (RAG) significantly improves the performance of Large Language Models (LLMs) on knowledge-intensive tasks. However, varying response quality across LLMs under RAG necessitates intelligent routing mechanisms, which select the most suitable model for each query from multiple retrieval-augmented LLMs via a dedicated router model. We observe that external documents dynamically affect LLMs' ability to answer queries, while existing routing methods, which rely on static parametric knowledge representations, exhibit suboptimal performance in RAG scenarios. To address this, we formally define the new retrieval-augmented LLM routing problem, incorporating the influence of retrieved documents into the routing framework. We propose RAGRouter, a RAG-aware routing design, which leverages document embeddings and RAG capability embeddings with contrastive learning to capture knowledge representation shifts and enable informed routing decisions. Extensive experiments on diverse knowledge-intensive tasks and retrieval settings, covering open and closed-source LLMs, show that RAGRouter outperforms the best individual LLM and existing routing methods. With an extended score-threshold-based mechanism, it also achieves strong performance-efficiency trade-offs under low-latency constraints. The code and data are available at https://github.com/OwwO99/RAGRouter.

RAG路由优化LLM智能问答

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。