ErrorLLM: Modeling SQL Errors for Text-to-SQL Refinement
Zijin Hong, Hao Chen, Zheng Yuan, Qinggang Zhang, Luyao Zhuang, Qing Liao, Feiran Huang, Yangqiu Song, Xiao Huang

TL;DR
ErrorLLM introduces an explicit error modeling framework for text-to-SQL refinement, significantly improving the detection and correction of implicit errors in SQL queries generated by large language models.
Contribution
The paper presents ErrorLLM, a novel approach that explicitly models SQL errors using structural features and dedicated error tokens to enhance refinement accuracy.
Findings
ErrorLLM achieves the highest improvements over baseline models.
High detection F1 score correlates with better refinement performance.
Explicit error modeling effectively addresses implicit errors.
Abstract
Despite the remarkable performance of large language models (LLMs) in text-to-SQL (SQL generation), correctly producing SQL queries remains challenging during initial generation. The SQL refinement task is subsequently introduced to correct syntactic and semantic errors in generated SQL queries. However, existing paradigms face two major limitations: (i) self-debugging becomes increasingly ineffective as modern LLMs rarely produce explicit execution errors that can trigger debugging signals; (ii) self-correction exhibits low detection precision due to the lack of explicit error modeling grounded in the question and schema, and suffers from severe hallucination that frequently corrupts correct SQLs. In this paper, we propose ErrorLLM, a framework that explicitly models text-to-SQL Errors within a dedicated LLM for text-to-SQL refinement. Specifically, we represent the user question and…
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.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsScientific Computing and Data Management · Web Application Security Vulnerabilities · Software Engineering Research
