Abstract
In recent years, Large Language Models (LLMs) have demonstrated remarkable capabilities in data analytics when integrated with Multi-Agent Systems (MAS). However, these systems often struggle with complex tasks that involve diverse functional requirements and intricate data processing challenges, necessitating customized solutions that lack broad applicability. Furthermore, current MAS fail to emulate essential human-like traits such as self-planning, self-monitoring, and collaborative work in dynamic environments, leading to inefficiencies and resource wastage. To address these limitations, we propose ROMAS, a novel Role-Based Multi-Agent System designed to adapt to various scenarios while enabling low-code development and one-click deployment. ROMAS has been effectively deployed in DB-GPT, a well-known project utilizing LLM-powered database analytics, showcasing its practical utility in real-world scenarios. By integrating role-based collaborative mechanisms for self-monitoring and self-planning, and leveraging existing MAS capabilities to enhance database interactions, ROMAS offers a more effective and versatile solution. Experimental evaluations demonstrate its superiority across multiple scenarios, highlighting its potential to advance the field of multi-agent data analytics.
Introduction
While Large Language Models (LLMs) are powerful, integrating them into Multi-Agent Systems (MAS) for data analytics often encounters significant hurdles. Current MAS approaches typically suffer from static rigidity, relying on predefined processes that lack the flexibility to handle unexpected errors. Furthermore, many frameworks are domain-specific and struggle to generalize to complex database interactions. Most critically, existing systems lack a "human-like" global monitoring capability; when a subtask fails, the system often continues blindly or fails entirely because no observer exists to diagnose the error and adjust the plan.
ROMAS (Role-Based Multi-Agent System) bridges this gap by creating a resilient, self-correcting architecture specifically optimized for database environments. By introducing a specialized "Global Monitor" role alongside Planners and Workers, the system can dynamically detect errors and trigger intelligent re-planning.
System Architecture and Methodology
The core of ROMAS is its Role-Based Collaboration model, which divides agents into three distinct functional roles that emulate human organizational structures:
- The Planner: Responsible for decomposing user requests into a global task list and assembling a specialized team of worker agents.
- The Worker: Executes specific subtasks such as data extraction, SQL generation, or visualization.
- The Monitor: Acts as the system's "brain," overseeing workers in real-time. It classifies failures as either "pipeline errors" (fixable via instruction) or "generation errors" (requiring strategic re-planning).
The system operates in three iterative phases: Initialization, Execution, and Re-planning. A key technical innovation is the "Gap Narrow" strategy used during re-planning. Instead of generating a new plan from scratch—which is computationally expensive—the system identifies specific differences between the old and new strategies and applies minimal, high-impact corrections.
ROMAS is built upon DB-GPT, an open-source framework providing specialized tools for database interactions, including Text2SQL fine-tuning and private deployment capabilities. This foundation allows ROMAS to achieve high performance with significantly less code (1,500 lines) compared to generic implementations using frameworks like LangChain (2,500 lines).
Experimental Evaluation
The researchers evaluated ROMAS using two distinct benchmarks to test both domain-specific and general reasoning capabilities:
- FAMMA: A financial data analysis benchmark involving complex multilingual and multimodal (text + tables) question answering.
- HotpotQA: A multi-hop reasoning dataset used to demonstrate the system's ability to integrate information across multiple documents.
Key Results
ROMAS demonstrated clear superiority over both single-agent baselines and state-of-the-art MAS:
- Success Rate (SR): On the FAMMA dataset, ROMAS achieved an 81.68% success rate, vastly outperforming GPT-4 alone (42.85%) and the previous best MAS, AutoAgents (73.45%).
- General Reasoning: On HotpotQA, ROMAS reached an 85.24% SR, showing robustness in general multi-hop logic.
- Efficiency: In framework comparisons, ROMAS (via DB-GPT) averaged a QA time of 12.23 seconds, nearly twice as fast as a comparable LangChain implementation (22.08s).
Discussion and Insights
Ablation studies revealed that the Global Monitor is the most critical component; its removal caused success rates to plummet by over 22% on financial tasks. This suggests that individual agent self-reflection is insufficient for complex systems; a global perspective is required to catch systemic failures.
As shown in the structural comparison above, ROMAS is uniquely positioned by offering a global monitor and plan correction capabilities that are absent in many contemporary frameworks. Furthermore, ROMAS utilizes a tiered memory hierarchy—Sensory, Short-term, Long-term, and Hybrid—to manage LLM context limits effectively while maintaining historical awareness for re-planning.
Conclusion and Future Work
ROMAS represents a significant step toward autonomous, resilient data analytics agents. While it excels at monitoring and planning, future work will focus on expanding its "computational agency"—moving beyond analysis to autonomous decision-making. Additionally, the authors plan to integrate continual learning techniques to help agents adapt to new database schemas without full retraining and to improve the system's handling of complex, multi-turn human dialogues.
Summary updated