Retrieval-Augmented Generation (RAG) effectively grounds Large Language Models (LLMs) with external knowledge and is widely applied to Web-related tasks. However, its scalability is hindered by excessive context length and redundant retrievals. Recent research on soft context compression aims to address this by encoding long documents into compact embeddings, yet they often underperform non-compressed RAG due to their reliance on auto-encoder-like full-compression that forces the encoder to compress all document information regardless of relevance to the input query. In this work, we conduct an analysis on this paradigm and reveal two fundamental limitations: (I) Infeasibility, full-compression conflicts with the LLM's downstream generation behavior; and (II) Non-necessity: full-compression is unnecessary and dilutes task-relevant information density. Motivated by these insights, we introduce SeleCom, a selector-based soft compression framework for RAG that redefines the encoder's role as query-conditioned information selector. The selector is decoder-only and is trained with a massive, diverse and difficulty-graded synthetic QA dataset with curriculum learning. Extensive experiments show that SeleCom significantly outperforms existing soft compression approaches and achieves competitive or superior performance to non-compression baselines, while reducing computation and latency by 33.8%~84.6%.
翻译:检索增强生成(RAG)通过外部知识有效支撑大型语言模型(LLM),并广泛应用于Web相关任务。然而,过长的上下文长度和冗余检索会制约其可扩展性。近期关于软上下文压缩的研究试图通过将长文档编码为紧凑嵌入来解决该问题,但由于其依赖类自编码器的全压缩模式——强制编码器压缩所有文档信息(无论是否与输入查询相关),导致性能常不及非压缩RAG。本文对该范式进行分析,揭示其两大根本性局限:(Ⅰ)不可行性:全压缩与LLM的下游生成行为相冲突;(Ⅱ)非必要性:全压缩不必要且会稀释任务相关信息密度。受此启发,我们提出SeleCom——一种基于选择器的RAG软压缩框架,将编码器角色重新定义为查询条件信息选择器。该选择器采用解码器架构,通过包含海量、多样且难度分级的合成问答数据集,结合课程学习进行训练。大量实验表明,SeleCom显著优于现有软压缩方法,在计算量和延迟降低33.8%~84.6%的同时,达到甚至超越非压缩基线的性能。