arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2605.10235cs.CL
收藏

在检索前路由:激活大语言模型的潜在路由能力用于RAG与长上下文选择

Route Before Retrieve: Activating Latent Routing Abilities of LLMs for RAG vs. Long-Context Selection

Beihang University(北航);HKUST(香港科技大学);Alibaba Group(阿里巴巴集团);Pennsylvania State University(宾夕法尼亚州立大学)

Yiwen Chen, Kuan Li, Fuzhen Zhuang, Deqing Wang, Zhao Zhang, Liwen Zhang, Yong Jiang, Shuai Wang, Minhao Cheng

AI总结:

本文提出Pre-Route框架,通过结构化推理提前决策,利用轻量级元数据进行任务分析和信息需求预测,实现可解释且高效的路由决策,实验表明其在成本效益上优于现有方法。

摘要:

近期大语言模型(LLMs)的进步将上下文窗口扩展到超过128K个标记,使长文档理解和多源推理成为可能。然而,选择检索增强生成(RAG)与长上下文(LC)策略仍是关键挑战:RAG效率高但受限于检索质量,而LC支持全局推理但成本高且位置敏感。现有方法如Self-Route采用故障驱动的回退策略,但被动、低效且难以解释。本文提出Pre-Route,一种主动路由框架,在回答前进行结构化推理。利用轻量级元数据(如文档类型、长度、初始片段),Pre-Route实现任务分析、覆盖估计和信息需求预测,产生可解释且成本高效的路由决策。研究发现:(i)LLMs具有潜在的路由能力,可通过指导可靠地激发,使单样本性能接近多样本(Best-of-N)结果;(ii)线性探针显示结构化提示增强了表示空间中“最优路由维度”的分离度;(iii)知识蒸馏将此推理结构转移到小型模型中实现轻量部署。在LaRA(领域内)和LongBench-v2(领域外)上的实验表明,Pre-Route在成本效益上优于Always-RAG、Always-LC和Self-Route基线方法。

英文摘要:

Recent advances in large language models (LLMs) have expanded the context window to beyond 128K tokens, enabling long-document understanding and multi-source reasoning. A key challenge, however, lies in choosing between retrieval-augmented generation (RAG) and long-context (LC) strategies: RAG is efficient but constrained by retrieval quality, while LC supports global reasoning at higher cost and with position sensitivity. Existing methods such as Self-Route adopt failure-driven fallback from RAG to LC, but remain passive, inefficient, and hard to interpret. We propose Pre-Route, a proactive routing framework that performs structured reasoning before answering. Using lightweight metadata (e.g., document type, length, initial snippet), Pre-Route enables task analysis, coverage estimation, and information-need prediction, producing explainable and cost-efficient routing decisions. Our study shows three key findings: (i) LLMs possess latent routing ability that can be reliably elicited with guidelines, allowing single-sample performance to approach that of multi-sample (Best-of-N) results; (ii) linear probes reveal that structured prompts sharpen the separability of the "optimal routing dimension" in representation space; and (iii) distillation transfers this reasoning structure to smaller models for lightweight deployment. Experiments on LaRA (in-domain) and LongBench-v2 (OOD) confirm that Pre-Route outperforms Always-RAG, Always-LC, and Self-Route baselines, achieving superior overall cost-effectiveness.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑