提出高效鲁棒的上下文裁剪方法,提升问答中大模型生成质量
Provence: efficient and robust context pruning for retrieval-augmented generation
- 将裁剪任务建模为序列标注,动态判断需裁剪量
- 在多个领域和场景下性能几乎无损,开箱即用
- 融合重排能力,训练数据多样,适合实际部署
检索增强生成(RAG)能提升大语言模型的生成效果,但长上下文带来计算开销,且无关检索内容会污染生成结果。上下文裁剪通过在生成前剔除无关内容解决此问题。现有方法受限,难以在不同长度、相关性或领域下同时做到高效与鲁棒。本文提出Provence(Pruning and Reranking Of retrieved relevant ContExts),一种面向问答的高效鲁棒裁剪方法,能动态识别所需裁剪程度,支持跨领域直接使用。其核心包括:将裁剪建模为序列标注任务、统一裁剪与重排能力、在多样化数据上训练。实验表明,Provence 在多种场景下实现近乎无损的性能,且对标准RAG流程几乎无额外开销。进一步分析与消融实验也为未来训练上下文裁剪器提供了洞见。
原文摘要 · Abstract (English)
Retrieval-augmented generation improves various aspects of large language models (LLMs) generation, but suffers from computational overhead caused by long contexts as well as the propagation of irrelevant retrieved information into generated responses. Context pruning deals with both aspects, by removing irrelevant parts of retrieved contexts before LLM generation. Existing context pruning approaches are however limited, and do not provide a universal model that would be both efficient and robust in a wide range of scenarios, e.g., when contexts contain a variable amount of relevant information or vary in length, or when evaluated on various domains. In this work, we close this gap and introduce Provence (Pruning and Reranking Of retrieVEd relevaNt ContExts), an efficient and robust context pruner for Question Answering, which dynamically detects the needed amount of pruning for a given context and can be used out-of-the-box for various domains. The three key ingredients of Provence are formulating the context pruning task as sequence labeling, unifying context pruning capabilities with context reranking, and training on diverse data. Our experimental results show that Provence enables context pruning with negligible to no drop in performance, in various domains and settings, at almost no cost in a standard RAG pipeline. We also conduct a deeper analysis alongside various ablations to provide insights into training context pruners for future work.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。