R3: “This is My SQL, Are You With Me?” A Consensus-Based Multi-Agent System for Text-to-SQL Tasks
Hanchen Xia, Feng Jiang, Naihao Deng, Cunxiang Wang, Guojiang Zhao, Rada Mihalcea, Yue Zhang
Abstract
Large Language Models (LLMs) have demonstrated exceptional performance across diverse tasks. To harness their capabilities for Text-to-SQL, we introduce R3 (Review-Rebuttal-Revision), a consensus-based multi-agent system for Text-to-SQL tasks. R3 achieves the new state-of-the-art performance of 89.9 on the Spider test set. In the meantime, R3 achieves 61.80 on the Bird development set. R3 outperforms existing single-LLM and multi-agent Text-to-SQL systems by 1.3% to 8.1% on Spi- der and Bird, respectively. Surprisingly, we find that for Llama-3-8B, R3 outperforms chain-of-thought prompting by over 20%, even outperforming GPT-3.5 on the Spider development set. We open-source our codebase at https://github.com/1ring2rta/R3.- Anthology ID:
- 2025.trl-1.4
- Volume:
- Proceedings of the 4th Table Representation Learning Workshop
- Month:
- July
- Year:
- 2025
- Address:
- Vienna, Austria
- Editors:
- Shuaichen Chang, Madelon Hulsebos, Qian Liu, Wenhu Chen, Huan Sun
- Venues:
- TRL | WS
- SIG:
- Publisher:
- Association for Computational Linguistics
- Note:
- Pages:
- 34–46
- Language:
- URL:
- https://preview.aclanthology.org/revision-workflow/2025.trl-1.4/
- DOI:
- 10.18653/v1/2025.trl-1.4
- Cite (ACL):
- Hanchen Xia, Feng Jiang, Naihao Deng, Cunxiang Wang, Guojiang Zhao, Rada Mihalcea, and Yue Zhang. 2025. R3: “This is My SQL, Are You With Me?” A Consensus-Based Multi-Agent System for Text-to-SQL Tasks. In Proceedings of the 4th Table Representation Learning Workshop, pages 34–46, Vienna, Austria. Association for Computational Linguistics.
- Cite (Informal):
- R3: “This is My SQL, Are You With Me?” A Consensus-Based Multi-Agent System for Text-to-SQL Tasks (Xia et al., TRL 2025)
- PDF:
- https://preview.aclanthology.org/revision-workflow/2025.trl-1.4.pdf