Saved in:
Bibliographic Details
Main Authors: Zhang, Qianchi, Zhang, Hainan, Pang, Liang, Zheng, Hongwei, Zheng, Zhiming
Format: Preprint
Published: 2024
Subjects:
Online Access:https://arxiv.org/abs/2409.01579
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866917434980564992
author Zhang, Qianchi
Zhang, Hainan
Pang, Liang
Zheng, Hongwei
Zheng, Zhiming
author_facet Zhang, Qianchi
Zhang, Hainan
Pang, Liang
Zheng, Hongwei
Zheng, Zhiming
contents 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.
format Preprint
id arxiv_https___arxiv_org_abs_2409_01579
institution arXiv
publishDate 2024
record_format arxiv
spellingShingle AdaComp: Extractive Context Compression with Adaptive Predictor for Retrieval-Augmented Large Language Models
Zhang, Qianchi
Zhang, Hainan
Pang, Liang
Zheng, Hongwei
Zheng, Zhiming
Computation and Language
Artificial Intelligence
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.
title AdaComp: Extractive Context Compression with Adaptive Predictor for Retrieval-Augmented Large Language Models
topic Computation and Language
Artificial Intelligence
url https://arxiv.org/abs/2409.01579