CORAG: A Cost-Constrained Retrieval Optimization System for Retrieval-Augmented Generation

Ziting Wang, Haitao Yuan, Wei Dong, Gao Cong, Feifei Li · DOI

Introduction

Retrieval-Augmented Generation (RAG) has become the standard for grounding Large Language Models (LLMs) in external data. However, traditional RAG systems often treat retrieval as a simple "top-k" search, ignoring the complex relationships between text chunks. This approach faces three primary hurdles: redundant or correlated information between chunks, the "non-monotonic utility" where adding more data can actually decrease response quality (the "lost in the middle" phenomenon), and the inability to adapt retrieval strategies to diverse query types.

CORAG (Cost-Constrained Retrieval Optimization) addresses these issues by transforming RAG from a static search into a sophisticated sequential optimization problem. It identifies the optimal ordered combination of text chunks that maximizes information gain while strictly adhering to token budgets.

Overview of the CORAG retrieval and combination process using an example query.

Methods

The CORAG architecture is divided into three distinct stages designed to optimize the "information-to-cost" ratio of retrieved content.

1. MCTS-Based Policy Tree

Instead of greedy selection, CORAG models chunk combinations as a tree structure. The root represents an empty state, and each child node represents the addition of a specific chunk to the sequence. The system employs Monte Carlo Tree Search (MCTS) to explore this space, balancing the exploration of new combinations with the exploitation of high-scoring sequences. This allows the system to find near-optimal solutions for what is otherwise an NP-hard problem.

2. Cost-Aware Utility Function

The search is guided by a node utility formula that combines the estimated benefit of a chunk sequence (provided by a reranker) with a penalty for token length. This ensures the system selects the most efficient chunks rather than just the most relevant ones, avoiding prompt "over-stuffing."

3. Configuration Agent

To handle query diversity, CORAG utilizes a Siamese Network-based Configuration Agent. Trained via offline contrastive learning, this agent analyzes the input query to dynamically predict the best reranker model and MCTS parameters (such as search depth and cost coefficients) for that specific task.

The three-step CORAG architecture: Potential Chunks Retrieval, Online Configuration Inference, and Optimal Chunk Search.

Key Insights and Results

  • Order Matters: CORAG explicitly optimizes the order in which chunks are fed to the LLM, recognizing that sequence significantly impacts model performance.
  • Performance Boost: In evaluations using the WikiPassageQA and MSMARCO benchmarks, CORAG demonstrated a 25-30% improvement in ROUGE scores compared to mainstream baselines like NaiveRAG and RAPTOR.
  • Efficiency at Scale: Despite the complexity of tree search, CORAG’s retrieval time only increased by approximately 10% compared to traditional methods. This efficiency is achieved through parallel expansion, leveraging GPU batch-processing to evaluate multiple combinations simultaneously.
  • Scalability: The system maintained high performance even as the document pool scaled to over 100,000 passages, making it suitable for enterprise-grade applications.

Conclusion

CORAG represents a shift toward more strategic retrieval in RAG systems. By treating chunk selection as a cost-constrained optimization problem, it provides a robust framework for maximizing LLM utility within strict token limits. Future work will focus on reducing reranker latency and exploring adaptive prompt compression to further streamline the generation phase.

Summary updated

BibTeX
@inproceedings{wang2026corag,
  author = {Ziting Wang and Haitao Yuan and Wei Dong and Gao Cong and Feifei Li},
  title = {{CORAG: A Cost-Constrained Retrieval Optimization System for Retrieval-Augmented Generation}},
  booktitle = {ICDE},
  year = {2026},
  doi = {10.1109/icde65706.2026.00162},
}
Figure