MAGIC: Generating Self-Correction Guideline for In-Context Text-to-SQL
Arian Askari, Christian Poelitz, Xinye Tang

TL;DR
MAGIC is an automated multi-agent system that creates self-correction guidelines for text-to-SQL tasks, outperforming human-crafted guidelines and improving interpretability of LLM corrections.
Contribution
Introduces MAGIC, a novel multi-agent framework that automates self-correction guideline generation for LLM-based text-to-SQL, reducing human effort and enhancing correction quality.
Findings
MAGIC's guidelines outperform human-crafted ones.
Guidelines improve interpretability of LLM corrections.
Automated process reduces manual effort in guideline creation.
Abstract
Self-correction in text-to-SQL is the process of prompting large language model (LLM) to revise its previously incorrectly generated SQL, and commonly relies on manually crafted self-correction guidelines by human experts that are not only labor-intensive to produce but also limited by the human ability in identifying all potential error patterns in LLM responses. We introduce MAGIC, a novel multi-agent method that automates the creation of the self-correction guideline. MAGIC uses three specialized agents: a manager, a correction, and a feedback agent. These agents collaborate on the failures of an LLM-based method on the training set to iteratively generate and refine a self-correction guideline tailored to LLM mistakes, mirroring human processes but without human involvement. Our extensive experiments show that MAGIC's guideline outperforms expert human's created ones. We empirically…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Code & Models
Videos
Taxonomy
TopicsBusiness Process Modeling and Analysis · Semantic Web and Ontologies · Service-Oriented Architecture and Web Services
MethodsSparse Evolutionary Training
