增强RAG效率的自适应上下文压缩
Enhancing RAG Efficiency with Adaptive Context Compression
AI总结:
提出ACC-RAG框架,根据输入复杂度动态调整压缩率,结合分层压缩与上下文选择,在维基百科和五个问答数据集上实现超4倍推理加速并保持准确率。
摘要:
检索增强生成(RAG)通过外部知识增强大语言模型(LLM),但由于检索到的上下文冗长,导致显著的推理成本。虽然上下文压缩可缓解此问题,但现有方法采用固定压缩率,对简单查询过度压缩或对复杂查询压缩不足。我们提出用于RAG的自适应上下文压缩(ACC-RAG),一种根据输入复杂度动态调整压缩率的框架,在不牺牲准确性的前提下优化推理效率。ACC-RAG结合了分层压缩器(用于多粒度嵌入)和上下文选择器,以保留最小充分信息,类似于人类略读。在维基百科和五个问答数据集上的评估表明,ACC-RAG优于固定压缩率方法,相比标准RAG实现超过4倍的推理加速,同时保持或提升准确性。
英文摘要:
Retrieval-augmented generation (RAG) enhances large language models (LLMs) with external knowledge but incurs significant inference costs due to lengthy retrieved contexts. While context compression mitigates this issue, existing methods apply fixed compression rates, over-compressing simple queries or under-compressing complex ones. We propose Adaptive Context Compression for RAG (ACC-RAG), a framework that dynamically adjusts compression rates based on input complexity, optimizing inference efficiency without sacrificing accuracy. ACC-RAG combines a hierarchical compressor (for multi-granular embeddings) with a context selector to retain minimal sufficient information, akin to human skimming. Evaluated on Wikipedia and five QA datasets, ACC-RAG outperforms fixed-rate methods and matches/unlocks over 4 times faster inference versus standard RAG while maintaining or improving accuracy.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。