检索增强生成改善了大型语言模型(LLMs)生成的各个方面,但由于长上下文以及无关检索信息传播到生成响应中,导致其面临计算开销。上下文剪枝通过在LLM生成之前移除检索上下文中的无关部分来处理这两个问题。然而,现有的上下文剪枝方法存在局限性,并未提供一个在各种场景下(例如,当上下文包含不同数量的相关信息或长度不同时,或在不同领域评估时)既高效又鲁棒的通用模型。在本研究中,我们填补了这一空白,并引入了Provence(Pruning and Reranking Of retrieVEd relevaNt ContExts),这是一种用于问答的高效且鲁棒的上下文剪枝器,能够动态检测给定上下文所需的剪枝量,并可直接开箱即用于各种领域。Provence的三个关键要素是将上下文剪枝任务表述为序列标注,统一上下文剪枝能力与上下文重排序,以及在多样化数据上进行训练。我们的实验结果表明,Provence在各种领域和设置下实现了上下文剪枝,且性能下降微乎其微至无下降,在标准RAG流程中几乎不增加成本。我们还进行了深入分析和各种消融实验,为未来训练上下文剪枝器提供了见解。
英文摘要:
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.
Enhancing Knowledge Density via Hierarchical Context Pruning for Retrieval-Augmented Repository-Level Code Completion
MIIT Key Laboratory of Pattern Analysis and Machine Intelligence(信息科技模式分析与机器智能国家重点实验室);College of Computer Science and Technology(计算机科学与技术学院);Huaneng Information Technology Co Ltd(华能信息技术有限公司);Hunan Vanguard Group Corporation Co Ltd(湖南 Vanguard集团有限公司);Tsinghua University(清华大学);Zhejiang University(浙江大学);PowerChina Huadong Engineering Co Ltd(国家电网华东工程有限公司)
Less is More for RAG: Information Gain Pruning for Generator-Aligned Reranking and Evidence Selection
organization= School of Computer Science;Technology, Dalian University of Technology , addressline= No.2 Linggong Road, Ganjingzi District , city= Dalian , postcode= 116024 , country= China;organization= College of Health-Preservation;Wellness, Dalian Medical University , addressline= No. 9 West Section of Lvshun South Road, Lvshunkou District , city= Dalian , postcode= 116044 , country= China;organization= School of Information Engineering, Dalian Ocean University , addressline= No. 2-52, Heishijiao Street, Shahekou District , city= Dalian , postcode= 116023 , country= China;organization= School of Information Engineering, Liaodong University , addressline= No.116 Linjiang Back Street, Zhenan District , city= Dandong , postcode= 118001 , country= China;organization= Information Technology Center, Qinghai University , addressline= 251 Ningda Road, Chengbei District , city= Xining , postcode= 810016 , country= China;organization= School of Electronic;Information Engineering, Liaoning Technical University , addressline= 188 Longwan South Street, Sijiatun District , city= Huludao , postcode= 125105 , country= China;organization= Tencent (Dalian Northern Interactive Entertainment Technology Co., Ltd.) , addressline= 21/F, Tencent Building, No. 26 Jingxian St, Ganjingzi District , city= Dalian , postcode= 116085 , country= China
Beyond Black-Box Interventions: Latent Probing for Faithful Retrieval-Augmented Generation
School of Informatics, Xiamen University(厦门大学信息学院);The Hong Kong Polytechnic University(香港理工大学);University of Chinese Academy of Sciences(中国科学院大学);Alibaba Group(阿里巴巴集团);Key Laboratory of Digital Protection and Intelligent Processing of Intangible Cultural Heritage of Fujian and Taiwan (Xiamen University), Ministry of Culture and Tourism, China(福建省和台湾非物质文化遗产数字化保护与智能处理重点实验室(厦门大学),中华人民共和国文化和旅游部,中国)
Decoupling Semantics and Logic: A Training-Free Coarse-to-Fine Pipeline for Video Retrieval-Augmented Generation
School of Computer Science & Tech, Huazhong University of Science and Technology(华中科技大学计算机科学与技术学院);School of AI and Automation, Huazhong University of Science and Technology(华中科技大学人工智能与自动化学院)
G-Refer: Graph Retrieval-Augmented Large Language Model for Explainable Recommendation
The Hong Kong University of Science and Technology (Guangzhou)(香港科技大学(广州));The Chinese University of Hong Kong(香港中文大学);Monash University(莫纳什大学);Huawei Technologies Co., Ltd.(华为技术有限公司)
Co-Evolving Skill Generation and Policy Optimization
The Pennsylvania State University(宾夕法尼亚州立大学);Nanyang Technological University(南洋理工大学);University of California, San Diego(加州大学圣迭戈分校);University of Utah(犹他大学);Harvard University(哈佛大学)
Biomedical knowledge graph-optimized prompt generation for large language models
University of California San Francisco(加州大学旧金山分校);San Diego Supercomputer Center, University of California, San Diego(加州大学圣地亚哥分校圣地亚哥超级计算机中心);University of California, San Francisco(加州大学旧金山分校);Institute for Systems Biology(系统生物学研究所);Bakar Computational Health Sciences Institute, University of California, San Francisco(加州大学旧金山分校巴卡尔计算健康科学研究所);Mate Bioservices, Inc.(Mate 生物服务公司)