arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2511.14769cs.IRcs.AIcs.CLcs.LG
收藏

基于聚类的自适应检索:面向RAG应用的动态上下文选择

Cluster-based Adaptive Retrieval: Dynamic Context Selection for RAG Applications

University of Southern California(美国南加州大学)

Yifan Xu, Vipul Gupta, Rohit Aggarwal, Varsha Mahadevan, Bhaskar Krishnamachari

AI总结:

针对RAG静态top-k检索无法适配不同查询需求的问题,提出基于聚类的自适应检索算法CAR,可动态选择最优检索文档数,在基准测试中表现优于固定基线,落地后显著降本增效并提升用户参与度。

摘要:

检索增强生成(RAG)通过从海量且持续增长的语料库中引入外部材料、文档、代码、手册来增强大语言模型(LLM),以有效回答用户查询。RAG的效果在很大程度上取决于检索文档数量与查询特征的匹配度:聚焦性强的窄域查询通常需要少量高度相关的文档,而范围更广或存在歧义的查询则适合检索更丰富的支撑信息。然而,主流的静态top-k检索方法无法适配这种差异性,要么因文档过少导致上下文不足,要么因文档过多引入冗余信息。针对上述挑战,我们提出基于聚类的自适应检索(Cluster-based Adaptive Retrieval, CAR)算法,该算法通过分析有序的查询-文档相似度距离的聚类模式,动态确定最优文档数量。CAR会检测相似度距离中的转折点,即紧密聚类的高相关文档向低相关候选文档过渡的位置,从而建立随查询复杂度动态调整的自适应截断阈值。在Coinbase的CDP语料库和公开的MultiHop-RAG基准测试中,CAR始终能选择最优检索深度并取得最高TES分数,表现优于所有固定top-k基线方法。在下游RAG评估中,CAR在完全保留答案相关性的前提下,将LLM token用量减少60%,端到端延迟降低22%,幻觉减少10%。自CAR集成到Coinbase的虚拟助手后,用户参与度提升了200%。

英文摘要:

Retrieval-Augmented Generation (RAG) enhances large language models (LLMs) by pulling in external material, document, code, manuals, from vast and ever-growing corpora, to effectively answer user queries. The effectiveness of RAG depends significantly on aligning the number of retrieved documents with query characteristics: narrowly focused queries typically require fewer, highly relevant documents, whereas broader or ambiguous queries benefit from retrieving more extensive supporting information. However, the common static top-k retrieval approach fails to adapt to this variability, resulting in either insufficient context from too few documents or redundant information from too many. Motivated by these challenges, we introduce Cluster-based Adaptive Retrieval (CAR), an algorithm that dynamically determines the optimal number of documents by analyzing the clustering patterns of ordered query-document similarity distances. CAR detects the transition point within similarity distances, where tightly clustered, highly relevant documents shift toward less pertinent candidates, establishing an adaptive cut-off that scales with query complexity. On Coinbase's CDP corpus and the public MultiHop-RAG benchmark, CAR consistently picks the optimal retrieval depth and achieves the highest TES score, outperforming every fixed top-k baseline. In downstream RAG evaluations, CAR cuts LLM token usage by 60%, trims end-to-end latency by 22%, and reduces hallucinations by 10% while fully preserving answer relevance. Since integrating CAR into Coinbase's virtual assistant, we've seen user engagement jump by 200%.

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

↑