MAO-ARAG: Multi-Agent Orchestration for Adaptive Retrieval-Augmented Generation
Proposed MAO-ARAG multi-agent framework with reinforcement learning for adaptive retrieval-augmented generation, boosting QA performance.
Key Findings
Methodology
The approach models QA as a Multiagent Semi-Markov Decision Process (MSMDP), comprising a planner and multiple executors. The planner employs PPO to dynamically select and assemble modules (query rewriting, document selection, generation) based on F1 score and cost penalties, forming personalized workflows. The reward function integrates answer accuracy, token cost, latency, and format penalties, enabling multi-objective optimization. Training involves multi-turn interactions, continuously refining the policy for high-quality, cost-efficient answers.
Key Results
- On multiple QA benchmarks, MAO-ARAG achieved an average F1 score of 52.91, surpassing the best baseline Search-o1 by 3.08 points, demonstrating superior adaptability and performance.
- Even untrained versions effectively organized workflows, outperforming fixed-process methods, indicating robustness of the architecture.
- Adjusting hyperparameter α allowed balancing between answer quality and resource consumption, with results showing significant improvements in both metrics after reinforcement learning.
Significance
This work addresses the rigidity of fixed RAG pipelines, introducing a flexible, trainable, multi-agent scheduling system. It enhances QA performance across diverse scenarios, reduces costs, and offers a scalable solution for real-world applications. The integration of reinforcement learning for dynamic process orchestration marks a significant step toward intelligent, resource-aware language systems, with broad implications for industry and academia.
Technical Contribution
The key innovation lies in modeling RAG as an MSMDP, enabling dynamic, trainable workflow scheduling. The combination of a PPO-based optimizer with multi-objective reward functions allows for balancing answer quality and cost. This framework departs from static, hand-crafted pipelines, providing a scalable, adaptable architecture that can be extended to various multi-task, multi-modal applications, offering theoretical and practical advancements.
Novelty
This is the first to formalize RAG workflow scheduling as an MSMDP, leveraging reinforcement learning for adaptive, multi-module orchestration. It introduces a trainable planner that can generalize across tasks, setting a new paradigm for flexible, cost-effective question answering systems, surpassing prior fixed or heuristic-based methods.
Limitations
- The approach relies heavily on training data quality and quantity, and its generalization to unseen, highly complex, or domain-specific questions remains to be validated.
- Reinforcement learning training incurs high computational costs, limiting scalability in resource-constrained environments.
- Current architecture primarily targets structured QA, and performance on unstructured or open-ended tasks needs further exploration.
Future Work
Future directions include optimizing multi-agent cooperation mechanisms, integrating multi-modal data and knowledge graphs for richer decision-making, and improving training efficiency through model compression and transfer learning. Extending the framework to handle unstructured data and multi-lingual scenarios will further broaden its applicability.
AI Executive Summary
Question answering systems face a persistent challenge: how to balance answer accuracy, computational cost, and response latency across diverse queries. Traditional RAG architectures, while effective, rely on fixed workflows that cannot adapt to the varying complexity of real-world questions. This rigidity often results in either wasted resources on simple queries or insufficient performance on complex ones. To address this, we introduce MAO-ARAG, a novel multi-agent framework that models QA as a Multiagent Semi-Markov Decision Process (MSMDP). The core idea is to dynamically orchestrate a set of modules—such as query reformulation, document retrieval, and answer generation—using a trainable planner guided by reinforcement learning.
The planner employs the PPO algorithm, optimizing a reward function that combines answer quality (F1 score) with cost penalties related to token usage, latency, and workflow format. During training, the system interacts over multiple turns, continuously refining its scheduling policy to produce personalized workflows tailored to each question. This adaptive approach enables the system to handle simple and complex queries efficiently, achieving high accuracy while maintaining low resource consumption.
Experimental results across seven benchmark datasets demonstrate that MAO-ARAG outperforms existing fixed and heuristic-based methods, with an average F1 score of 52.91, surpassing the best baseline by over 3 points. Notably, even untrained versions can organize effective workflows, highlighting the robustness of the architecture. The ability to tune hyperparameters like α allows balancing performance and cost, making the system suitable for real-world deployment.
This work marks a significant advancement in adaptive, resource-aware question answering. By integrating multi-agent modeling with reinforcement learning, it opens avenues for scalable, flexible, and intelligent knowledge systems. Future research will focus on enhancing multi-agent cooperation, incorporating multi-modal data, and improving training efficiency, aiming to realize fully autonomous, cost-effective AI assistants in diverse domains.
Deep Analysis
Background
The evolution of large language models (LLMs) such as GPT and BERT has revolutionized question answering (QA) and information retrieval. Early methods like BM25 and dense retrievers (Contriever, ColBERT) laid the foundation for integrating external knowledge. Modular RAG architectures emerged to combine retrieval and generation, with components like query rewriting, document selection, and self-reflection. Despite progress, fixed workflows limit adaptability, especially as query complexity varies. Recent efforts incorporate reinforcement learning to optimize process sequences, but challenges remain in balancing accuracy, cost, and scalability across diverse scenarios.
Core Problem
Existing RAG systems rely on static, hand-designed workflows that cannot adapt dynamically to different query complexities. Simple questions are over-resourced, while complex ones may lack sufficient processing, leading to inefficiency and suboptimal performance. Furthermore, balancing answer quality with resource consumption, such as token usage and latency, remains difficult. The core challenge is designing a flexible, trainable system capable of selecting and orchestrating modules in real-time, tailored to each question’s demands. This involves modeling the process as a multi-objective optimization problem with multiple constraints and uncertainties.
Innovation
The paper introduces a multi-agent framework based on MSMDP, where a trainable planner dynamically orchestrates modules (executors) like query reformulation, retrieval, and answer generation. Key innovations include:
1) Modeling QA as an MSMDP, capturing variable action durations and multi-agent coordination.
2) Using PPO reinforcement learning to optimize a multi-objective reward balancing answer accuracy and costs.
3) Designing a flexible, modular workflow system that adapts per query, outperforming fixed pipelines.
This approach enables real-time, personalized workflow construction, significantly improving efficiency and accuracy.
Methodology
- �� Model QA as an MSMDP with states representing question features, actions as module selections, and rewards based on answer quality and costs.
- �� The planner receives observations (question prompts) and outputs a sequence of modules (actions) to execute.
- �� The reward function combines F1 score, token cost, latency penalty, and format penalty, scaled between 0 and 1.
- �� The training employs PPO, updating the policy via advantage estimation, with the loss combining actor and critic components.
- �� During training, the system interacts over multiple turns, refining its scheduling policy based on feedback.
- �� The final system can adaptively generate workflows for diverse questions, optimizing overall QA performance.
Experiments
Experiments involve seven QA datasets (NQ, PopQA, HotpotQA, etc.), using Wikipedia as the knowledge base and E5 for retrieval. The models include Qwen2.5-7B-Instruct as the planner and GPT-4o-Mini as executor. Evaluation metrics cover F1 scores, token costs, retrieval calls, and workflow turns. Baselines include fixed-process RAG, iterative RAG, and RL-based methods. Results show MAO-ARAG achieves an average F1 of 52.91, outperforming baselines by over 3 points, with lower resource consumption. Ablation studies confirm the importance of adaptive scheduling and reward design.
Results
The adaptive framework significantly improves QA accuracy, with the trained model surpassing static methods. The F1 score increases by 3.08 points over the best baseline, while costs such as token usage and retrieval calls remain controlled. Hyperparameter tuning of α demonstrates a flexible trade-off between performance and efficiency. Even untrained models effectively organize workflows, indicating robustness. These results validate the effectiveness of dynamic, reinforcement-learned scheduling in complex QA tasks.
Applications
This framework can be deployed in enterprise customer service, academic research, and knowledge management, where question complexity varies widely. Its ability to adapt workflows reduces costs and improves response accuracy, making AI assistants more intelligent and resource-efficient. Future integration with multi-modal data and knowledge graphs will further expand its real-world impact, enabling scalable, personalized knowledge services across industries.
Limitations & Outlook
The approach depends heavily on high-quality training data and computational resources, limiting scalability in resource-constrained environments. Its effectiveness on unstructured or highly novel questions remains to be validated. The training process is computationally intensive, and the current architecture is primarily designed for structured QA, requiring further adaptation for open-ended tasks. Future work should focus on improving generalization, reducing training costs, and extending applicability to broader domains.
Plain Language Accessible to non-experts
想象你在厨房做饭。每道菜的难度不同,有的简单,有的复杂。以前,厨师用同一种流程做所有菜,不管菜难不难,结果有时快,有时慢,菜也不一定好吃。现在,有个聪明的厨师(系统),他会根据每道菜的难度,选择不同的帮手(模块)合作:有的帮你切菜,有的帮你调味,有的帮你摆盘。这个厨师还会学习,知道什么时候用快方法,什么时候用细心方法。这样,做出来的菜既快又好吃,还省材料。这就像这个系统,能根据问题的不同,灵活调度不同的模块,做出最合适的答案。
ELI14 Explained like you're 14
想象你在学校里,有很多不同难度的作业。有的很简单,只用平时学的知识就能搞定;有的很难,要查资料、写很多东西。以前老师给你一套固定的做作业流程,不管作业难不难,都用一样的方法。现在,有个聪明的帮手(系统),它会根据每个作业的难度,安排不同的帮手(模块)合作:有的帮你查资料,有的帮你写草稿,有的帮你检查。这个帮手会不断学习,知道什么时候用快的方法,什么时候用细心的方法。这样,你的作业既能快完成,又能做得很好。就像有个聪明的团队,能根据任务的不同,灵活安排工作流程,帮你高效完成各种作业。
Glossary
MSMDP (Multiagent Semi-Markov Decision Process)
一种模型,用于描述多个智能体协作完成任务的决策过程,考虑动作持续时间和多智能体协调。
将问答流程建模为多智能体系统,优化流程调度。
PPO (Proximal Policy Optimization)
一种强化学习算法,通过限制策略变化范围稳定训练,适合连续空间策略优化。
用于训练问答流程中的规划器,提升调度策略。
F1 Score
衡量模型准确率的指标,结合精确率和召回率,适合评估问答答案的质量。
作为奖励函数的核心指标,用于优化问答系统性能。
RAG (Retrieval-Augmented Generation)
结合检索和生成模型的架构,用于提升问答的准确性和信息覆盖。
本文的基础架构,结合外部知识库实现动态问答。
Reinforcement Learning
一种机器学习方法,通过与环境交互学习最优策略,最大化累计奖励。
用于训练流程调度器,实现动态流程优化。
Open Questions Unanswered questions from this research
- 1 如何在极端复杂或新颖问题中保持高性能仍是挑战,模型泛化能力不足,需探索更强的迁移学习和多任务训练策略。
- 2 当前方法主要在结构化问答场景验证,面对开放式或非结构化任务时效果未知,未来需扩展适应性。
Applications
Immediate Applications
智能客服系统
根据用户提问的复杂度,动态调度不同模块,提升响应速度和准确率,降低运营成本。
学术问答平台
结合多模态信息和知识图谱,实现个性化、精确的学术信息检索与解答。
Long-term Vision
全自动知识管理系统
实现企业或机构的知识库智能调度与维护,支持多场景、多语言、多任务的知识服务。
Abstract
In question-answering (QA) systems, Retrieval-Augmented Generation (RAG) has become pivotal in enhancing response accuracy and reducing hallucination issues. The architecture of RAG systems varies significantly, encompassing single-round RAG, iterative RAG, and reasoning RAG, each tailored to address different types of queries. Due to the varying complexity of real-world queries, a fixed RAG pipeline often struggles to balance performance and cost efficiency across different queries. To address this challenge, we propose an adaptive RAG framework called MAO-ARAG, which leverages multi-agent orchestration. Our adaptive RAG is conceived as a multi-turn framework. Specifically, we define multiple executor agents, representing typical RAG modules such as query reformulation agents, document selection agent, and generation agents. A planner agent intelligently selects and integrates the appropriate agents from these executors into a suitable workflow tailored for each query, striving for high-quality answers while maintaining reasonable costs. During each turn, the planner agent is trained using reinforcement learning, guided by an outcome-based reward (F1 score) and a cost-based penalty, continuously improving answer quality while keeping costs within a reasonable range. Experiments conducted on multiple QA datasets demonstrate that our approach, which dynamically plans workflows for each query, not only achieves high answer quality but also maintains both cost and latency within acceptable limits.The code of MAO-ARAG is on https://github.com/chenyiqun/Agentic-RAG.