mlsanityData to 14 Oct 2026

MAC-SQL: A Multi-Agent Collaborative Framework for Text-to-SQL

arXiv 2312.11242 ↗First posted 18 Dec 2023cs.CLcited by 164

On the map: LLM agents and tool use → Web, search, and research agents

Abstract (arXiv)

Recent LLM-based Text-to-SQL methods usually suffer from significant performance degradation on "huge" databases and complex user questions that require multi-step reasoning. Moreover, most existing methods neglect the crucial significance of LLMs utilizing external tools and model collaboration. To address these challenges, we introduce MAC-SQL, a novel LLM-based multi-agent collaborative framework. Our framework comprises a core decomposer agent for Text-to-SQL generation with few-shot chain-of-thought reasoning, accompanied by two auxiliary agents that utilize external tools or models to acquire smaller sub-databases and refine erroneous SQL queries. The decomposer agent collaborates with auxiliary agents, which are activated as needed and can be expanded to accommodate new features or tools for effective Text-to-SQL parsing. In our framework, We initially leverage GPT-4 as the strong backbone LLM for all agent tasks to determine the upper bound of our framework. We then fine-tune an open-sourced instruction-followed model, SQL-Llama, by leveraging Code Llama 7B, to accomplish all tasks as GPT-4 does. Experiments show that SQL-Llama achieves a comparable execution accuracy of 43.94, compared to the baseline accuracy of 46.35 for vanilla GPT-4. At the time of writing, MAC-SQL+GPT-4 achieves an execution accuracy of 59.59 when evaluated on the BIRD benchmark, establishing a new state-of-the-art (SOTA) on its holdout test set (https://github.com/wbbeyourself/MAC-SQL).

Key facts. Cited by 164 papers in the map (data through 14 Oct 2026). Placed in Web, search, and research agents, one of 16 directions in LLM agents and tool use. Builds on 22 of its 48 references that are in the map. First posted on arXiv 18 Dec 2023.

Builds on

22 of 48 references.

References · 22

  1. 2020Language Models are Few-Shot Learnerscited by 32,419
  2. 2022Training language models to follow instructions with human feedbackcited by 15,971
  3. 2023A Survey on Large Language Model based Autonomous Agentscited by 2,242
  4. 2023Code Llama: Open Foundation Models for Codecited by 2,139
  5. 2023AutoGen: Enabling Next-Gen LLM Applications via Multi-Agent Conversationcited by 1,988
  6. 2018Spider: A Large-Scale Human-Labeled Dataset for Complex and Cross-Domain Semantic Parsing and Text-to-SQL Taskcited by 1,139
  7. 2023Can LLM Already Serve as A Database Interface? A BIg Bench for Large-Scale Database Grounded Text-to-SQLscited by 688
  8. 2023DIN-SQL: Decomposed In-Context Learning of Text-to-SQL with Self-Correctioncited by 477
  9. 2019RAT-SQL: Relation-Aware Schema Encoding and Linking for Text-to-SQL Parserscited by 424
  10. 2021PICARD: Parsing Incrementally for Constrained Auto-Regressive Decoding from Language Modelscited by 411
  11. 2023Text-to-SQL Empowered by Large Language Models: A Benchmark Evaluationcited by 385
  12. 2023StructGPT: A General Framework for Large Language Model to Reason over Structured Datacited by 343
10 more
  1. 2022UnifiedSKG: Unifying and Multi-Tasking Structured Knowledge Grounding with Text-to-Text Language Modelscited by 231
  2. 2019Towards Complex Text-to-SQL in Cross-Domain Database with Intermediate Representationcited by 210
  3. 2023C3: Zero-shot Text-to-SQL with ChatGPTcited by 164
  4. 2023OpenAgents: An Open Platform for Language Agents in the Wildcited by 137
  5. 2017SQLNet: Generating Structured Queries From Natural Language Without Reinforcement Learningcited by 135
  6. 2020Semantic Evaluation for Text-to-SQL with Distilled Test Suitescited by 126
  7. 2023Exploring Chain-of-Thought Style Prompting for Text-to-SQLcited by 69
  8. 2023How to Prompt LLMs for Text-to-SQL: A Study in Zero-shot, Single-domain, and Cross-domain Settingscited by 58
  9. 2022Recent Advances in Text-to-SQL: A Survey of What We Have and What We Expectcited by 47
  10. 2019X-SQL: reinforce schema representation with contextcited by 22

Built on by

Cited by year (2026 to 14 Oct)

Citing papers per year: 2024: 17; 2025: 75; 2026: 72.

164 papers.

Sort:

By area:

  1. 2024TableBench: A Comprehensive and Complex Benchmark for Table Question Answeringcited by 128
  2. 2024Next-Generation Database Interfaces: A Survey of LLM-based Text-to-SQLcited by 120
  3. 2025OmniSQL: Synthesizing High-quality Text-to-SQL Data at Scalecited by 91
  4. 2024The Death of Schema Linking? Text-to-SQL in the Age of Well-Reasoned Language Modelscited by 67
  5. 2024A Survey of Text-to-SQL in the Era of LLMs: Where are we, and where are we going?cited by 56
  6. 2025XiYan-SQL: A Novel Multi-Generator Framework For Text-to-SQLcited by 40
  7. 2024Understanding the Effects of Noise in Text-to-SQL: An Examination of the BIRD-Bench Benchmarkcited by 34
  8. 2025Is Long Context All You Need? Leveraging LLM's Extended Context for NL2SQLcited by 30
  9. 2025A Survey of Data Agents: Emerging Paradigm or Overstated Hype?cited by 30
  10. 2025LinkAlign: Scalable Schema Linking for Real-World Large-Scale Multi-Database Text-to-SQLcited by 29
  11. 2026The Long-Horizon Task Mirage? Diagnosing Where and Why Agentic Systems Breakcited by 25
  12. 2025nvAgent: Automated Data Visualization from Natural Language via Collaborative Agent Workflowcited by 23
38 more
  1. 2024MAG-SQL: Multi-Agent Generative Approach with Soft Schema Linking and Iterative Sub-SQL Refinement for Text-to-SQLcited by 22
  2. 2025SQL-o1: A Self-Reward Heuristic Dynamic Search Method for Text-to-SQLcited by 19
  3. 2025BIRD-INTERACT: Re-imagining Text-to-SQL Evaluation for Large Language Models via Lens of Dynamic Interactionscited by 19
  4. 2025ToolFuzz -- Automated Agent Tool Testingcited by 18
  5. 2025STaR-SQL: Self-Taught Reasoner for Text-to-SQLcited by 17
  6. 2025RAS-Eval: A Comprehensive Benchmark for Security Evaluation of LLM Agents in Real-World Environmentscited by 17
  7. 2025AutoLink: Autonomous Schema Exploration and Expansion for Scalable Schema Linking in Text-to-SQL at Scalecited by 17
  8. 2024MdEval: Massively Multilingual Code Debuggingcited by 16
  9. 2025SHARE: An SLM-based Hierarchical Action CorREction Assistant for Text-to-SQLcited by 16
  10. 2025SWE-SQL: Illuminating LLM Pathways to Solve User SQL Issues in Real-World Applicationscited by 16
  11. 2025ExCyTIn-Bench: Evaluating LLM agents on Cyber Threat Investigationcited by 15
  12. 2025MARS-SQL: A multi-agent reinforcement learning framework for Text-to-SQLcited by 15
  13. 2024An Electoral Approach to Diversify LLM-based Multi-Agent Collective Decision-Makingcited by 14
  14. 2025Understanding, Detecting, and Repairing Real-World In-Context-Learning-Based Text-to-SQL Errorscited by 14
  15. 2025Think2SQL: Reinforce LLM Reasoning Capabilities for Text2SQLcited by 14
  16. 2026Pervasive Annotation Errors Break Text-to-SQL Benchmarks and Leaderboardscited by 13
  17. 2025SQLens: An End-to-End Framework for Error Detection and Correction in Text-to-SQLcited by 12
  18. 2024Solid-SQL: Enhanced Schema-linking based In-context Learning for Robust Text-to-SQLcited by 11
  19. 2025AmbiSQL: Interactive Ambiguity Detection and Resolution for Text-to-SQLcited by 11
  20. 2025Text-to-SQL as Dual-State Reasoning: Integrating Adaptive Context and Progressive Generationcited by 10
  21. 2024Structure Guided Large Language Model for SQL Generationcited by 9
  22. 2025BASE-SQL: A powerful open source Text-To-SQL baseline approachcited by 9
  23. 2025Uncovering the Impact of Chain-of-Thought Reasoning for Direct Preference Optimization: Lessons from Text-to-SQLcited by 9
  24. 2025Knapsack Optimization-based Schema Linking for LLM-based Text-to-SQL Generationcited by 9
  25. 2025Knowledge Base Construction for Knowledge-Augmented Text-to-SQLcited by 9
  26. 2025LearNAT: Learning NL2SQL with AST-guided Task Decomposition for Large Language Modelscited by 8
  27. 2025ReEx-SQL: Reasoning with Execution-Aware Reinforcement Learning for Text-to-SQLcited by 8
  28. 2025Toward Structured Knowledge Reasoning: Contrastive Retrieval-Augmented Generation on Experiencecited by 8
  29. 2025Multilingual Text-to-SQL: Benchmarking the Limits of Language Models with Collaborative Language Agentscited by 8
  30. 2026APEX-SQL: Talking to the data via Agentic Exploration for Text-to-SQLcited by 8
  31. 2024End-to-end Text-to-SQL Generation within an Analytics Insight Enginecited by 7
  32. 2024Text-to-SQL Calibration: No Need to Ask -- Just Rescale Model Probabilitiescited by 7
  33. 2025Graph-Reward-SQL: Execution-Free Reinforcement Learning for Text-to-SQL via Graph Matching and Stepwise Rewardcited by 7
  34. 2026SQL-Trail: Multi-Turn Reinforcement Learning with Interleaved Feedback for Text-to-SQLcited by 7
  35. 2024DAC: Decomposed Automation Correction for Text-to-SQLcited by 6
  36. 2025SQL-of-Thought: Multi-agentic Text-to-SQL with Guided Error Correctioncited by 6
  37. 2025DB-Explore: Automated Database Exploration and Instruction Synthesis for Text-to-SQLcited by 5
  38. 2025Query and Conquer: Execution-Guided SQL Generationcited by 5

50 most cited of 164 All 164 (JSON)

Similar, not cited

Close in wording, no citation either way

  1. 2025AGENTIQL: An Agent-Inspired Multi-Expert Framework for Text-to-SQL Generation
  2. 2025Chain-of-Query: Unleashing the Power of LLMs in SQL-Aided Table Understanding via Multi-Agent Collaboration
  3. 2026AV-SQL: Decomposing Complex Text-to-SQL Queries with Agentic Views
  4. 2025A Multi-agent Text2SQL Framework using Small Language Models and Execution Feedback
  5. 2026Integrating Reasoning and Generalization in Text-to-SQL via Self-Enhanced Fine-Tuning
  6. 2023On Evaluating the Integration of Reasoning and Action in LLM Agents with Database Question Answering
  7. 2025OpenSearch-SQL: Enhancing Text-to-SQL with Dynamic Few-shot and Consistency Alignment
  8. 2026SQuaD-SQL: Efficient Text-to-SQL with Small Language Models via LLM-Guided Knowledge Distillation