mlsanityData to 7 Oct 2026

MAG-SQL: Multi-Agent Generative Approach with Soft Schema Linking and Iterative Sub-SQL Refinement for Text-to-SQL

arXiv 2408.07930 ↗First posted 15 Aug 2024cs.CL cs.AIcited by 22

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

Abstract (arXiv)

Recent In-Context Learning based methods have achieved remarkable success in Text-to-SQL task. However, there is still a large gap between the performance of these models and human performance on datasets with complex database schema and difficult questions, such as BIRD. Besides, existing work has neglected to supervise intermediate steps when solving questions iteratively with question decomposition methods, and the schema linking methods used in these works are very rudimentary. To address these issues, we propose MAG-SQL, a multi-agent generative approach with soft schema linking and iterative Sub-SQL refinement. In our framework, an entity-based method with tables' summary is used to select the columns in database, and a novel targets-conditions decomposition method is introduced to decompose those complex questions. Additionally, we build a iterative generating module which includes a Sub-SQL Generator and Sub-SQL Refiner, introducing external oversight for each step of generation. Through a series of ablation studies, the effectiveness of each agent in our framework has been demonstrated. When evaluated on the BIRD benchmark with GPT-4, MAG-SQL achieves an execution accuracy of 61.08%, compared to the baseline accuracy of 46.35% for vanilla GPT-4 and the baseline accuracy of 57.56% for MAC-SQL. Besides, our approach makes similar progress on Spider. The codes are available at https://github.com/LancelotXWX/MAG-SQL.

Key facts. Cited by 22 papers in the map (data through 7 Oct 2026). Placed in Web, search, and research agents, one of 16 directions in LLM agents and tool use. Builds on 29 of its 32 references that are in the map. First posted on arXiv 15 Aug 2024.

Builds on

29 of 32 references.

Closest ancestors · 1

Same direction, newest first

  1. 2023MAC-SQL: A Multi-Agent Collaborative Framework for Text-to-SQL18 Dec

Other references · 28

  1. 2017Attention Is All You Needcited by 59,932
  2. 2020Language Models are Few-Shot Learnerscited by 32,199
  3. 2023GPT-4 Technical Reportcited by 18,132
  4. 2014Sequence to Sequence Learning with Neural Networkscited by 2,974
  5. 2022Least-to-Most Prompting Enables Complex Reasoning in Large Language Modelscited by 1,397
  6. 2018Spider: A Large-Scale Human-Labeled Dataset for Complex and Cross-Domain Semantic Parsing and Text-to-SQL Taskcited by 1,120
  7. 2017Seq2SQL: Generating Structured Queries from Natural Language using Reinforcement Learningcited by 679
  8. 2023Can LLM Already Serve as A Database Interface? A BIg Bench for Large-Scale Database Grounded Text-to-SQLscited by 667
  9. 2023DIN-SQL: Decomposed In-Context Learning of Text-to-SQL with Self-Correctioncited by 465
  10. 2019RAT-SQL: Relation-Aware Schema Encoding and Linking for Text-to-SQL Parserscited by 420
  11. 2023Text-to-SQL Empowered by Large Language Models: A Benchmark Evaluationcited by 378
  12. 2019Towards Complex Text-to-SQL in Cross-Domain Database with Intermediate Representationcited by 210
16 more
  1. 2024CodeS: Towards Building Open-source Language Models for Text-to-SQLcited by 183
  2. 2024CHESS: Contextual Harnessing for Efficient SQL Synthesiscited by 164
  3. 2023C3: Zero-shot Text-to-SQL with ChatGPTcited by 159
  4. 2017SQLNet: Generating Structured Queries From Natural Language Without Reinforcement Learningcited by 135
  5. 2021LGESQL: Line Graph Enhanced Text-to-SQL Model with Mixed Local and Non-Local Relationscited by 119
  6. 2024MCS-SQL: Leveraging Multiple Prompts and Multiple-Choice Selection For Text-to-SQL Generationcited by 103
  7. 2019A Comprehensive Exploration on WikiSQL with Table-Aware Word Contextualizationcited by 88
  8. 2023Exploring Chain-of-Thought Style Prompting for Text-to-SQLcited by 69
  9. 2020RYANSQL: Recursively Applying Sketch-based Slot Fillings for Complex Text-to-SQL in Cross-Domain Databasescited by 63
  10. 2018Robust Text-to-SQL Generation with Execution-Guided Decodingcited by 51
  11. 2021SADGA: Structure-Aware Dual Graph Aggregation Network for Text-to-SQLcited by 43
  12. 2023SQL-PaLM: Improved Large Language Model Adaptation for Text-to-SQL (extended)cited by 42
  13. 2024Decomposition for Enhancing Attention: Improving LLM-based Text-to-SQL through Workflow Paradigmcited by 31
  14. 2021Improving Text-to-SQL with Schema Dependency Learningcited by 25
  15. 2021Weakly Supervised Text-to-SQL Parsing through Question Decompositioncited by 15
  16. 2018Dynamic Self-Attention : Computing Attention over Words Dynamically for Sentence Embeddingcited by 8

Built on by

Cited by year (2026 to 7 Oct)

Citing papers per year: 2024: 2; 2025: 15; 2026: 5.

22 papers.

Sort:

By area:

  1. 2024RSL-SQL: Robust Schema Linking in Text-to-SQL Generationcited by 51
  2. 2025Understanding, Detecting, and Repairing Real-World In-Context-Learning-Based Text-to-SQL Errorscited by 14
  3. 2025MTIR-SQL: Multi-turn Tool-Integrated Reasoning Reinforcement Learning for Text-to-SQLcited by 10
  4. 2025ReEx-SQL: Reasoning with Execution-Aware Reinforcement Learning for Text-to-SQLcited by 8
  5. 2025Text-to-SQL as Dual-State Reasoning: Integrating Adaptive Context and Progressive Generationcited by 8
  6. 2025LearNAT: Learning NL2SQL with AST-guided Task Decomposition for Large Language Modelscited by 7
  7. 2026APEX-SQL: Talking to the data via Agentic Exploration for Text-to-SQLcited by 7
  8. 2025DB-Explore: Automated Database Exploration and Instruction Synthesis for Text-to-SQLcited by 5
  9. 2025Exploring the Landscape of Text-to-SQL with Large Language Models: Progresses, Challenges and Opportunitiescited by 4
  10. 2025Chain-of-Query: Unleashing the Power of LLMs in SQL-Aided Table Understanding via Multi-Agent Collaborationcited by 4
  11. 2025Training-Free Time Series Classification via In-Context Reasoning with LLM Agentscited by 4
  12. 2024Evaluating and Enhancing LLMs for Multi-turn Text-to-SQL with Multiple Question Typescited by 3
10 more
  1. 2025Text2Schema: Filling the Gap in Designing Database Table Structures based on Natural Languagecited by 2
  2. 2025SDE-SQL: Enhancing Text-to-SQL Generation in Large Language Models via Self-Driven Exploration with SQL Probescited by 2
  3. 2025Toward Real-World Table Agents: Capabilities, Workflows, and Design Principles for LLM-based Table Intelligencecited by 2
  4. 2025GBV-SQL: Guided Generation and SQL2Text Back-Translation Validation for Multi-Agent Text2SQLcited by 1
  5. 2025Beyond SELECT: A Comprehensive Taxonomy-Guided Benchmark for Real-World Text-to-SQL Translationcited by 1
  6. 2026Both Ends Count! Just How Good are LLM Agents at "Text-to-Big SQL"?cited by 1
  7. 2026PExA: Parallel Exploration Agent for Complex Text-to-SQLcited by 1
  8. 2025Chatting with your ERP: A Recipecited by 0
  9. 2026DexterSQL: Deep Schema Exploration and Rule-based Correction for Text-to-SQL Generationcited by 0
  10. 2026ACTS-SQL: Agentic and Critic-Oriented Tree-Structured SQL Correctness with Large Language Modelscited by 0

Similar, not cited

Close in wording, no citation either way

  1. 2026AV-SQL: Decomposing Complex Text-to-SQL Queries with Agentic Views
  2. 2025SQL-of-Thought: Multi-agentic Text-to-SQL with Guided Error Correction
  3. 2025AGENTIQL: An Agent-Inspired Multi-Expert Framework for Text-to-SQL Generation
  4. 2024PET-SQL: A Prompt-Enhanced Two-Round Refinement of Text-to-SQL with Cross-consistency
  5. 2024Cooperative SQL Generation for Segmented Databases By Using Multi-functional LLM Agents
  6. 2025RAISE: Reasoning Agent for Interactive SQL Exploration
  7. 2025SING-SQL: A Synthetic Data Generation Framework for In-Domain Text-to-SQL Translation
  8. 2024ROUTE: Robust Multitask Tuning and Collaboration for Text-to-SQL