Research map / Multi-agent systems and games / LLM agents
SQLFixAgent: Towards Semantic-Accurate Text-to-SQL Parsing via Consistency-Enhanced Multi-Agent Collaboration
Read the paperCheck your idea against 108,967 papers
AI-extracted summary. Written by AI from the paper's full text. Numbers and claims can be wrong or missing context, so check the paper before you cite or build on it.
Proposes SQLFixAgent, a multi-agent framework (SQLReviewer, QueryCrafter, SQLRefiner) that detects and repairs semantic and syntax errors in SQL produced by fine-tuned CodeS models, using GPT-3.5-turbo agents.
Problem
Fine-tuned LLMs for Text-to-SQL generate grammatically valid SQL that often has semantic mismatches with the user question, which silently execute and mislead users.
Approach
A multi-agent repair loop in which a rubber-duck-style reviewer flags semantic mismatches, a query-variant generator produces multiple candidate SQLs from a fine-tuned SQL model, and a refiner selects and repairs the final SQL using similar-repair retrieval and failure-memory reflection, with a general LLM used as agents rather than as the SQL generator.
Key results
- CodeS-7B + SQLFixAgent reaches 60.17% EX on BIRD dev, a +3.00 point gain over CodeS-7B (57.17%).
- CodeS-3B + SQLFixAgent improves BIRD dev EX by 3.65 points to 58.67%.
- On Spider dev, CodeS-7B + SQLFixAgent reaches 86.2% EX (+0.8), and on Spider-DK it reaches 74.2% EX (+2.2).
Measured effects reported in the paper
| What was changed | Where | Measured | Effect |
|---|---|---|---|
| add SQLFixAgent to CodeS-3B | CodeS-3B · BIRD dev | EX: +3.65 | Helped |
| add SQLFixAgent to CodeS-7B | CodeS-7B · BIRD dev | EX: +3.00 | Helped |
| add SQLFixAgent to CodeS-3B | CodeS-3B · BIRD dev | VES: +5.65 | Helped |
| add SQLFixAgent to CodeS-7B | CodeS-7B · BIRD dev | VES: +4.35 | Helped |
| add SQLFixAgent to CodeS-3B | CodeS-3B · Spider dev | EX: +1.4% | Helped |
| add SQLFixAgent to CodeS-7B | CodeS-7B · Spider dev | EX: +0.8% | Helped |
| add SQLFixAgent to CodeS-7B | CodeS-7B · Spider test | EX: +0.6% | Helped |
| add SQLFixAgent to CodeS-7B | CodeS-7B · Spider-Syn | EX: +0.8% | Helped |
| add SQLFixAgent to CodeS-7B | CodeS-7B · Spider-Realistic | EX: +0.4% | Helped |
| add SQLFixAgent to CodeS-7B | CodeS-7B · Spider-DK | EX: +2.2% | Helped |
| remove rubber duck debugging (COT) from SQLReviewer (ablation) | CodeS-3B + SQLFixAgent · BIRD dev | EX: 58.67 -> 58.15 | Hurt |
| remove failure memory reflection (Reflexion) (ablation) | CodeS-3B + SQLFixAgent · BIRD dev | EX: 58.67 -> 57.56 | Hurt |
Surprising findings
- GPT-3.5 Turbo performs worse than fine-tuned CodeS-3B in every fine-grained BIRD category, yet it still improves the system when used as the repair agent.
- Repair success rate after detection is low (17.49% for CodeS-3B and 15.64% for CodeS-7B), so most detected errors are not fixed.
Limitations
- Repair success rate is low, limited by the backbone LLM's capability.
- Gains on Spider and its variants are small (0.4 to 2.2 EX points).
- Exact match does not improve on Spider since the agent is not fine-tuned.
Experimental setup
Datasets: Spider BIRD Spider-DK Spider-Syn Spider-Realistic
Benchmarks: BIRD Spider Spider-DK Spider-Syn Spider-Realistic
Metrics: execution accuracy exact match accuracy valid efficiency score token consumption
Baselines: MAC-SQL + GPT-3.5 Turbo CodeS-3B CodeS-7B DAIL-SQL + GPT-4 DIN-SQL + GPT-4 RESDSQL-3B + NatSQL SQL-PaLM STRIKE
Builds on: CodeS MAC-SQL Reflexion DAIL-SQL
Closest papers by meaning
- SQLens: An End-to-End Framework for Error Detection and Correction in Text-to-SQL (NeurIPS 2025 · similarity 0.89)
- ROUTE: Robust Multitask Tuning and Collaboration for Text-to-SQL (ICLR 2025 · similarity 0.86)
- SWE-SQL: Illuminating LLM Pathways to Solve User SQL Issues in Real-World Applications (NeurIPS 2025 · similarity 0.86)
- CAPER: Clause-Aligned Process Supervision for Text-to-SQL (NeurIPS 2026 · similarity 0.86)
- Spider 2.0: Evaluating Language Models on Real-World Enterprise Text-to-SQL Workflows (ICLR 2025 · similarity 0.85)
- Alpha-SQL: Zero-Shot Text-to-SQL using Monte Carlo Tree Search (ICML 2025 · similarity 0.85)
Writing a paper in this area? scime draft is a free LaTeX editor with AI included, real-time co-authors and a check of your references and venue rules before you submit. It also imports OpenAI Prism projects.
