about
SQLCritic: Correcting Text-to-SQL Generation via Clause-Wise Critic (arxiv.org)
1 point by PaulHoule on Mar 25, 2025 | hide | past | pdf | discuss on HN

In plain words: A checker reviews a generated SQL query one clause at a time, pointing out where syntax or meaning went wrong so it can be fixed. Trained this way, it raised accuracy on two standard test sets and caught more errors than usual whole-query self-checks.

Abstract · SQLCritic: Correcting Text-to-SQL Generation via Clause-wise Critic

Existing refinement methods in LLM-based Text-to-SQL systems exhibit limited effectiveness. They often introduce new errors during the self-correction process and fail to detect and correct semantic inaccuracies. To address these gaps, we first introduce a clause-wise critique generation task along with a benchmark, SQLCriticBench, which performs fine-grained error localization including both syntax and semantic errors at the clause level. Furthermore, we introduce a variant of DPO for training our SQLCritic model, where the $β$ coefficient is adaptively changed according to the clause-level inconsistencies between the preferred and dispreferred critiques. We also propose an automatically training dataset curation pipeline which annotate clause-wise critique at scale in a cost-effective way. Experiments demonstrate that the SQLCritic model significantly improves SQL accuracy on the BIRD and Spider datasets, and the results on SQLCriticBench further reveals its superior critique capabilities compared to existing models.

Jikai Chen, Leilei Gan, Ziyu Zhao, Zechuan Wang, Dong Wang, Chenyi Zhuang
arXiv:2503.07996 · cs.AI, cs.CL · submitted Mar 11, 2025 · updated May 21, 2025
abstract · pdf · html

add comment on HN