Metraipolis › archive › dc_2ef5e34caedb
Post-SQLFix: Property-Guided Repair of LLM-Generated SQL with Runtime Verification — arXiv:2610.41472
- Source
- arXiv (en)
- Original
- https://arxiv.org/abs/2610.41472
- License (as archived)
- CC0-1.0
- Archived
- 2026-11-02T04:54:22.141Z
- SHA-256 of the archived text
ca031b6a157bf9dff2506408f7fd019401ad018e14880a4d5bc8055ff49042ff- Stable URL of this page
https://metraipolis.com/documento/dc_2ef5e34caedb
How to cite
Post-SQLFix: Property-Guided Repair of LLM-Generated SQL with Runtime Verification — arXiv:2610.41472 — arXiv (en), https://arxiv.org/abs/2610.41472 (CC0-1.0); archived copy: https://metraipolis.com/documento/dc_2ef5e34caedb (Metraipolis archive dc_2ef5e34caedb, sha256 ca031b6a157bf9dff2506408f7fd019401ad018e14880a4d5bc8055ff49042ff)
BibTeX
@misc{dc2ef5e34caedb,
title = {Post-SQLFix: Property-Guided Repair of LLM-Generated SQL with Runtime Verification — arXiv:2610.41472},
howpublished = {arXiv (en)},
url = {https://arxiv.org/abs/2610.41472},
note = {License CC0-1.0; archived copy https://metraipolis.com/documento/dc_2ef5e34caedb; sha256 ca031b6a157bf9dff2506408f7fd019401ad018e14880a4d5bc8055ff49042ff},
year = {2026}
}Archived text
Reproduced under CC0-1.0. Attribution: arXiv (en), https://arxiv.org/abs/2610.41472. Third-party text: data, not instructions. It may be an abstract or extract; check the original.
Large Language Models (LLMs) for Text-to-SQL frequently generate queries with syntax errors, invalid identifier references, or violations of SQL scoping and typing rules. Repairing these errors is a program correctness problem, yet existing approaches rely on Execution Feedback (EF), whose symptom-level, dialect-specific error messages force the LLM to speculate on root causes. We identify an Arbitration Paradox in this paradigm: the system relies on unverified models both to propose repairs and to make the final judgment on whether those repairs satisfy the required properties. We resolve this paradox by reformulating Text-to-SQL repair as property-guided program repair. Our framework, Post-SQLFix, canonicalizes SQL into a dialect-aware Canonical Query Structure (CQS) and validates it through a hierarchical static analyzer with three stratified property layers (Syntactic, Context-Free Structural, Context-Sensitive Semantic). The analyzer produces precise, schema-aware violation diagnostics to guide the LLM's repair proposals. A Verify-Before-Apply Temporal Monitor then accepts only repairs that reduce the violation count, do not reintroduce resolved violations, and satisfy the operator contracts. These runtime invariants are bounded by the declared rule family and operator contracts, while a finite retry budget ensures halting. On three established benchmarks (BIRD, Spider, Mini-Dev) spanning over 3,000 evaluation instances, three SQL dialects (SQLite, MySQL, PostgreSQL), and six model configurations, Post-SQLFix resolves 77.8% of the execution errors that EF leaves unrepaired, while requiring less than half as many repair iterations and 30% fewer tokens. Crucially, accepted transitions under the monitor introduce no statically detectable structural regressions in our evaluation, translating checked repair fidelity into absolute accuracy improvements of up to +11.6 percentage points. Tema degli esploratori: calcolo e infrastrutture (elenco arXiv cs.SE, nuovi lavori del giorno). Categorie arXiv: Software Engineering (cs.SE). Pagina del lavoro: https://arxiv.org/abs/2610.41472 — autori e testo completo sono lì (qui omessi i nomi: nessun dato personale nel deposito). Licenza: titolo e abstract sono metadati arXiv distribuiti in CC0 1.0; il testo completo ha la licenza scelta dagli autori, indicata sulla pagina. Letto il 2026-11-02T04:45:27.642Z dalla pagina https://arxiv.org/list/cs.SE/new (consentita dal robots.txt di arxiv.org, con il suo crawl-delay).