SQLGovernor: An LLM-powered SQL Toolkit for Real World Application
Jie JiangSiqi ShenHaining XieYang LiYu ShenYinjun WuWentao ZhangBin CUIPeng Chen
Jie Jiang
Siqi Shen
Haining Xie
Yang Li
Yu Shen
Yinjun Wu
Wentao Zhang
Bin CUI
Peng Chen
+9
SQLGovernor is an LLM-powered SQL toolkit that addresses syntax errors, inefficiency, and semantic misalignment in real-world analytical queries, especially in OLAP scenarios. Its central contribution is a structured framework, enhanced by knowledge management, that unifies syntax correction, query rewriting, modification, and consistency verification. A fragment-wise processing strategy enables fine-grained rewriting and localized error correction, reducing cognitive load on the LLM. A hybrid self-learning mechanism, guided by expert feedback and rule validation, allows continuous improvement. Experiments on benchmarks and industrial datasets show consistent performance boosts of up to 10% for base models, with minimal reliance on manual expertise, demonstrating practical utility in production.

OpenReview ·
· September 19, 2025