arXiv:2506.08479cs.CLcs.AI2025-06EMNLP被引 20

动态调整检索数量,无需微调即可高效提升长文本问答准确率。

Efficient Context Selection for Long-Context QA: No Tuning, No Iteration, Just Adaptive-$k$

  • 根据查询与候选段落的相似度分布,单次计算自适应选择最优段落数量。
  • 在事实型和聚合型问答上均优于固定长度检索,最多节省90%令牌消耗。
  • 适用于各类长文本模型与嵌入模型,适合追求效率的部署场景。

检索增强生成(RAG)和长上下文语言模型(LCLMs)均旨在解决大模型在开放域问答中的上下文限制问题。然而,最佳外部上下文的检索规模仍是一个未解难题:固定检索长度可能浪费令牌或遗漏关键证据。现有自适应方法如Self-RAG和Self-Route依赖迭代式LLM提示,在事实型问答中表现良好,但在聚合型问答中表现不佳,因最优上下文大小既未知又可变。本文提出Adaptive-$k$检索方法,一种简单高效的单次遍历策略,根据查询与候选段落之间的相似度分布自适应选择段落数量。该方法无需模型微调、额外LLM推理或修改现有检索-阅读流水线。在事实型与聚合型问答基准上,Adaptive-$k$匹配或超越固定-$k$基线,同时相比全上下文输入最多减少10倍令牌使用,仍能召回70%的相关段落。其在五种LCLMs和两种嵌入模型上均提升准确率,表明动态调整上下文大小可实现更高效、更精准的问答。

原文摘要 · Abstract (English)

Retrieval-augmented generation (RAG) and long-context language models (LCLMs) both address context limitations of LLMs in open-domain question answering (QA). However, optimal external context to retrieve remains an open problem: fixing the retrieval size risks either wasting tokens or omitting key evidence. Existing adaptive methods like Self-RAG and Self-Route rely on iterative LLM prompting and perform well on factoid QA, but struggle with aggregation QA, where the optimal context size is both unknown and variable. We present Adaptive-$k$ retrieval, a simple and effective single-pass method that adaptively selects the number of passages based on the distribution of the similarity scores between the query and the candidate passages. It does not require model fine-tuning, extra LLM inferences or changes to existing retriever-reader pipelines. On both factoid and aggregation QA benchmarks, Adaptive-$k$ matches or outperforms fixed-$k$ baselines while using up to 10x fewer tokens than full-context input, yet still retrieves 70% of relevant passages. It improves accuracy across five LCLMs and two embedding models, highlighting that dynamically adjusting context size leads to more efficient and accurate QA.

长文本问答自适应检索RAG效率优化

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