用两阶段检索提升生成质量,兼顾召回率与上下文效率
Enhancing Retrieval-Augmented Generation with Two-Stage Retrieval: FlashRank Reranking and Query Expansion
- 先用大模型扩展查询,扩大候选文档召回范围
- 采用FlashRank动态筛选最优证据子集,节省上下文空间
- 适合追求高准确与低延迟的生成应用
检索增强生成(RAG)通过将检索器与大语言模型(LLM)结合,使生成内容基于外部证据。尽管该框架提升了事实性与领域适应能力,但仍面临关键瓶颈:在有限的LLM上下文窗口内平衡检索召回率。检索过少可能导致遗漏关键信息,过多则会淹没提示词窗口,降低相关性并增加成本。本文提出一种两阶段检索流程,融合大模型驱动的查询扩展以提升候选召回率,以及FlashRank——一种快速的边际效用重排序器,在令牌预算下动态选择最优证据子集。FlashRank将文档效用建模为相关性、新颖性、简洁性与交叉编码证据的加权组合。二者协同构成可推广的解决方案,显著提升答案准确性、忠实度与计算效率。
原文摘要 · Abstract (English)
Retrieval-Augmented Generation (RAG) couples a retriever with a large language model (LLM) to ground generated responses in external evidence. While this framework enhances factuality and domain adaptability, it faces a key bottleneck: balancing retrieval recall with limited LLM context. Retrieving too few passages risks missing critical context, while retrieving too many overwhelms the prompt window, diluting relevance and increasing cost. We propose a two-stage retrieval pipeline that integrates LLM-driven query expansion to improve candidate recall and FlashRank, a fast marginal-utility reranker that dynamically selects an optimal subset of evidence under a token budget. FlashRank models document utility as a weighted combination of relevance, novelty, brevity, and cross-encoder evidence. Together, these modules form a generalizable solution that increases answer accuracy, faithfulness, and computational efficiency.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。