用户可调的检索生成框架,让准确率和成本自由权衡。
Fast or Better? Balancing Accuracy and Cost in Retrieval-Augmented Generation with Flexible User Control
- 用两个分类器分别优化准确率与效率,通过参数α灵活控制。
- 实测在保持高准确率的同时显著降低检索成本。
- 适合需要自定义检索策略的落地应用开发者。
检索增强生成(RAG)通过引入外部知识检索,有效缓解大语言模型的幻觉问题。然而,现有RAG框架往往盲目检索,导致效率低下——无需时过度检索,复杂任务又无法迭代检索。近期自适应检索策略虽能根据查询复杂度动态调整,但仅依赖查询特征,缺乏用户可控性,难以满足多样应用场景需求。本文提出一种新型用户可控RAG框架,支持动态调节准确率与成本的权衡。该方法采用两个分类器:一个侧重准确率,另一个侧重检索效率。通过可解释的控制参数α,用户可根据实际需求,在低开销检索与高准确检索间无缝切换。实验表明,该方法在保证准确率的同时显著降低检索成本,具备良好的实用性与灵活性。代码已开源:https://github.com/JinyanSu1/Flare-Aug。
原文摘要 · Abstract (English)
Retrieval-Augmented Generation (RAG) has emerged as a powerful approach to mitigate large language model (LLM) hallucinations by incorporating external knowledge retrieval. However, existing RAG frameworks often apply retrieval indiscriminately,leading to inefficiencies-over-retrieving when unnecessary or failing to retrieve iteratively when required for complex reasoning. Recent adaptive retrieval strategies, though adaptively navigates these retrieval strategies, predict only based on query complexity and lacks user-driven flexibility, making them infeasible for diverse user application needs. In this paper, we introduce a novel user-controllable RAG framework that enables dynamic adjustment of the accuracy-cost trade-off. Our approach leverages two classifiers: one trained to prioritize accuracy and another to prioritize retrieval efficiency. Via an interpretable control parameter $α$, users can seamlessly navigate between minimal-cost retrieval and high-accuracy retrieval based on their specific requirements. We empirically demonstrate that our approach effectively balances accuracy, retrieval cost, and user controllability, making it a practical and adaptable solution for real-world applications. Code is available at https://github.com/JinyanSu1/Flare-Aug.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。