TL;DR
This paper introduces CORE-RAG, a novel framework for compressing retrieved documents in Retrieval-Augmented Generation (RAG) systems. Unlike previous methods that rely on heuristics and often degrade performance, CORE-RAG uses a performance-driven reinforcement learning approach to optimize context compression, leading to improved accuracy and significantly reduced computational costs.
What Problem Does This Paper Address?
Large Language Models (LLMs) are powerful but struggle with up-to-date knowledge and factual accuracy. Retrieval-Augmented Generation (RAG) addresses this by fetching relevant documents to augment the LLM's input. However, including many retrieved documents drastically increases input length, leading to prohibitive computational costs and the "lost-in-the-middle" problem where LLMs struggle to utilize long contexts effectively. Existing methods for compressing these retrieved documents often compromise task performance because they rely on predefined heuristics (like keyword overlap or summarization quality) rather than directly optimizing for the LLM's actual performance on the downstream task. This paper aims to bridge this gap by developing a compression method that directly aligns with task performance, ensuring both efficiency and accuracy.
Methods
The core innovation of CORE-RAG is its performance-driven optimization for context compression. Instead of using proxy heuristics, it treats the compressor as a policy in a reinforcement learning (RL) framework.
- Knowledge Distillation (Warm-Start): To provide a robust initial policy for the RL phase, CORE-RAG first uses a teacher LLM to generate summaries of retrieved documents. This distillation process creates a dataset of high-quality compressed contexts that are then used to fine-tune the compressor. Instances where the summarized context improves performance over the original are retained, while those that degrade performance result in an empty summary, teaching the model to avoid detrimental compression.
- Performance-Driven Reinforcement Learning: The compressor is then further optimized using RL. The compressor generates a summary, which is fed to the downstream LLM along with the original question. The LLM's generated answer is compared to the ground truth, and this task performance (measured by Exact Match and F1 scores) is used as the reward signal to update the compressor's policy. This direct feedback loop ensures the compressor learns to retain information crucial for accurate task completion. The authors use a Group Relative Policy Optimization (GRPO) algorithm for this stage.
- Lightweight Compressor: A key design choice is that the compressor is significantly smaller than the downstream LLM, making it computationally efficient for both training and inference.
Datasets
The authors evaluate their method on four standard QA datasets:
- Natural Questions (NQ): A single-hop QA dataset.
- TriviaQA: Another single-hop QA dataset.
- HotpotQA: A multi-hop QA dataset.
- 2WikiMultihopQA: Another multi-hop QA dataset.
They also conduct experiments on the LongBench benchmark, which features multi-document QA tasks with significantly longer contexts.
Key Insights and Ideas
- Performance is the ultimate metric: The most significant insight is that optimizing for task performance directly, rather than proxy metrics like summarization quality, is crucial for effective context compression in RAG. This "performance-driven" approach is the cornerstone of CORE-RAG.
- "Less is More" is achievable: The paper demonstrates that compressing context can not only reduce computational load but also improve performance, challenging the intuition that more context is always better.
- Warm-start with distillation is key: The knowledge distillation phase is vital for initializing the compressor with a sensible policy, making the subsequent RL training more stable and effective.
- Robustness across models and tasks: CORE-RAG shows strong generalization capabilities, performing well even when applied to different LLMs or datasets than those it was trained on.
Key Results
- Improved Accuracy: CORE-RAG achieves higher Exact Match (EM) scores than standard full-context RAG across all tested datasets, even at very high compression ratios (e.g., reducing context to ~3% of original tokens). For instance, on NQ, it improved EM by 3.3 points compared to full documents.
- Outperforms Baselines: CORE-RAG significantly outperforms existing compression methods like RECOMP, NoiseFilter-IB, LongLLMLingua, and QGC, which often result in performance degradation. It even surpasses larger models like DeepSeek-V3 in some scenarios.
- Efficiency Gains: The compressed context is drastically smaller (e.g., ~6% of full context for top 5 documents), leading to reduced inference latency and computational costs.
- Robustness: The method demonstrates robustness against noisy or adversarial retrieved contexts and shows strong transferability to unseen LLMs and datasets.
Limitations and Future Work
- Open-ended Tasks: The current reward function is designed for extractive QA. The authors suggest that for open-ended tasks (like summarization or dialogue), the reward function would need to be adapted using metrics like BARTScore, ROUGE, or LLM-as-a-Judge. The framework itself, however, is adaptable.
- Compressor Size: While CORE-RAG is designed to be lightweight, the paper notes that performance generally improves with larger compressor models (e.g., 3B vs. 1B parameters), suggesting a trade-off between efficiency and performance that could be further explored.
Summary updated