arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2409.01579cs.CLcs.AI
收藏

AdaComp: 基于自适应预测器的提取式上下文压缩用于检索增强型大语言模型

AdaComp: Extractive Context Compression with Adaptive Predictor for Retrieval-Augmented Large Language Models

Beijing Advanced Innovation Center for Future Blockchain and Privacy Computing(北京未来区块链与隐私计算先进创新中心);School of Artificial Intelligence, Beihang University(北航人工智能学院);Beijing Academy of Blockchain and Edge Computing(北京区块链与边缘计算研究院);Institute of Computing Technology, Chinese Academy of Sciences(中国科学院计算技术研究所)

Qianchi Zhang, Hainan Zhang, Liang Pang, Hongwei Zheng, Zhiming Zheng

AI总结:

本文提出AdaComp,一种低开销的提取式上下文压缩方法,通过自适应确定压缩率来平衡RAG的效率与性能,实验表明其在保持性能的同时显著降低了推理成本。

摘要:

包含噪声的检索文档会阻碍RAG检测答案线索并使推理过程变慢且昂贵。因此,上下文压缩是必要的,以提高其准确性和效率。现有上下文压缩方法使用提取或生成模型保留最相关的查询句子或应用信息瓶颈理论来保留足够的信息。然而,这些方法可能面临过度压缩或计算成本高的问题。我们观察到检索器通常会将相关文档排在前列,但由于查询复杂性和检索质量的影响,所需文档的确切数量不确定:复杂的查询如多跳问题可能需要保留比简单查询更多的文档,而低质量的检索可能需要依赖更多文档以生成准确的输出。因此,确定所需的最小文档数量(压缩率)仍然是RAG的一个挑战。在本文中,我们引入AdaComp,一种低成本的提取式上下文压缩方法,该方法根据查询复杂性和检索质量自适应地确定压缩率。具体来说,我们首先标注RAG系统回答当前查询所需的最小top-k文档作为压缩率,然后构建查询、检索文档及其压缩率的三元组。然后,我们使用这个三元组数据集训练一个压缩率预测器。在三个QA数据集和一个对话多文档QA数据集上的实验表明,AdaComp显著降低了推理成本,同时保持性能几乎与未压缩模型相同,实现了效率和性能之间的平衡。

英文摘要:

Retrieved documents containing noise will hinder RAG from detecting answer clues and make the inference process slow and expensive. Therefore, context compression is necessary to enhance its accuracy and efficiency. Existing context compression methods use extractive or generative models to retain the most query-relevant sentences or apply the information bottleneck theory to preserve sufficient information. However, these methods may face issues such as over-compression or high computational costs. We observe that the retriever often ranks relevant documents at the top, but the exact number of documents needed to answer the query is uncertain due to the impact of query complexity and retrieval quality: complex queries like multi-hop questions may require retaining more documents than simpler queries, and a low-quality retrieval may need to rely on more documents to generate accurate outputs. Therefore, determining the minimum number of required documents (compression rate) is still a challenge for RAG. In this paper, we introduce AdaComp, a low-cost extractive context compression method that adaptively determines the compression rate based on both query complexity and retrieval quality. Specifically, we first annotate the minimum top-k documents necessary for the RAG system to answer the current query as the compression rate and then construct triplets of the query, retrieved documents, and its compression rate. Then, we use this triplet dataset to train a compression-rate predictor. Experiments on three QA datasets and one conversational Multi-doc QA dataset show that AdaComp significantly reduces inference costs while maintaining performance nearly identical to uncompressed models, achieving a balance between efficiency and performance.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑