Improving Retrieval-Augmented Generation through Multi-Agent Reinforcement Learning

Yiqun Chen, Lingyong Yan, Weiwei Sun, Xinyu Ma, Yi Zhang, Shuaiqiang Wang, Dawei Yin, Yiming Yang, Jiaxin Mao

Abstract

Modern Retrieval-Augmented Generation (RAG) systems often struggle with misalignment between their constituent modules, such as query rewriters, retrievers, and generators. This paper presents MMOA-RAG (Multi-Module joint Optimization Algorithm for RAG), a framework that conceptualizes the RAG pipeline as a Cooperative Multi-Agent Reinforcement Learning (Co-MARL) problem. By using Multi-Agent Proximal Policy Optimization (MAPPO) with a shared reward based on final answer accuracy, MMOA-RAG synchronizes these modules to work toward a unified goal. Experimental results on multi-hop QA benchmarks like HotpotQA and 2WikiMultihopQA show that MMOA-RAG consistently outperforms existing baselines, highlighting the benefits of joint optimization over isolated supervised fine-tuning.

Introduction

Retrieval-Augmented Generation (RAG) has evolved from simple "retriever-generator" pairs into complex pipelines involving query rewriting, multi-stage retrieval, and document filtering. Typically, these modules are developed using Supervised Fine-Tuning (SFT) on isolated tasks. However, this approach often leads to a "misalignment" problem: a retriever might optimize for keyword relevance, but the retrieved documents may not actually assist the generator in producing the correct answer.

Existing reinforcement learning (RL) solutions often target only one or two components, failing to account for the intricate interdependencies across the entire pipeline. MMOA-RAG addresses this by treating the query rewriter, document selector, and generator as independent agents in a cooperative game, ensuring that every step in the process is optimized for the final output quality.

The MMOA-RAG Framework

The MMOA-RAG architecture consists of three trainable agents—a Query Rewriter, a Selector, and a Generator—all sharing a single Llama-3-8B-Instruct backbone to maximize parameter efficiency. A fixed Retriever serves as part of the environment.

The MMOA-RAG workflow and optimization process using Multi-Agent Reinforcement Learning.

Multi-Agent Optimization via MAPPO

To synchronize these agents, the framework utilizes Multi-Agent Proximal Policy Optimization (MAPPO). The core of this approach is the Shared Reward, where all agents receive a reward based on the F1 score of the final generated answer. This incentivizes the Rewriter and Selector to provide the specific information the Generator needs, rather than optimizing for intermediate proxy metrics. To maintain stability, individual penalties are applied for undesirable behaviors, such as excessive sub-question generation or formatting errors. The training process begins with a "warm start" phase using SFT to establish a baseline for instruction-following before transitioning to joint RL optimization.

Experimental Evaluation

The framework was rigorously tested on three challenging open-domain QA benchmarks:

  • HotpotQA: Demands multi-hop reasoning across disparate documents.
  • 2WikiMultihopQA: Involves complex reasoning over structured knowledge.
  • AmbigQA: Requires retrieving diverse information to resolve ambiguous queries.

Results and Key Insights

MMOA-RAG demonstrated superior performance across all metrics (Accuracy, Exact Match, and F1 Score) compared to specialized RAG methods like SELF-RAG and Rewrite-Retrieve-Read.

Performance comparison and ablation study of MMOA-RAG across HotpotQA, 2WikiMultihopQA, and AmbigQA datasets.

Alignment Over Proxy Metrics

By rewarding the entire pipeline based on the final answer, the system learns to prioritize helpful information over superficially relevant noise. Ablation studies revealed that joint training enhances the Generator's "denoising" capabilities; it becomes more adept at extracting correct answers even when the Selector provides imperfect document sets. Compared to the best-performing baselines, MMOA-RAG achieved an improvement of +1.80 F1 on HotpotQA, +1.89 F1 on 2WikiMultihopQA, and +2.67 F1 on AmbigQA.

Efficiency and Robustness

The use of parameter sharing allows a single LLM to perform multiple agent roles without significant overhead. Furthermore, MMOA-RAG proved robust across different underlying retrievers (e.g., Contriever, BGE, E5), indicating that the cooperative optimization framework is broadly applicable to various RAG configurations.

Conclusion and Future Directions

MMOA-RAG represents a significant step toward fully synchronized RAG pipelines. By treating the system as a multi-agent cooperative game, it overcomes the limitations of isolated module training.

Future work will explore making the retriever itself a trainable agent within the RL framework, which remains a technical challenge due to efficiency constraints. Additionally, the authors aim to extend the framework to more complex, non-linear "agentic" workflows, such as dynamic directed acyclic graphs (DAGs), to further enhance the reasoning capabilities of RAG systems.

Summary updated

BibTeX
@inproceedings{chen2025improving,
  author = {Yiqun Chen and Lingyong Yan and Weiwei Sun and Xinyu Ma and Yi Zhang and Shuaiqiang Wang and Dawei Yin and Yiming Yang and Jiaxin Mao},
  title = {{Improving Retrieval-Augmented Generation through Multi-Agent Reinforcement Learning}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2025},
  url = {https://openreview.net/forum?id=9Ia0KiVAut},
}
Figure