Intelli-Dispatch-SQL: An LLM-based agent for reliable Text-to-SQL in power dispatching
The increasing complexity of modern power systems, driven by factors such as the large-scale integration of renewable energy and the proliferation of distributed generation, has placed unprecedented demands on power dispatching operations. Ensuring grid stability and safety in this new environment requires real-time monitoring and swift, data-driven decision-making. Consequently, efficient and accurate data querying capabilities have become paramount. This study introduces Intelli-Dispatch-SQL, a novel agent-based Text-to-SQL framework that leverages the Large Language Model (LLM) to enhance the accuracy and reliability of generated SQL queries in the context of power dispatching. By integrating intent recognition and SQL validation modules, Intelli-Dispatch-SQL ensures that generated queries are not only syntactically correct but also semantically aligned with user intent and executable within the operational context. Through comprehensive experiments, including ablation studies and cross-model evaluations, we demonstrate that Intelli-Dispatch-SQL significantly outperforms existing Text-to-SQL models, achieving substantial improvements in both Exact Match (EM) and Execution Accuracy (EX). Notably, the incorporation of intent recognition and SQL validation modules is shown to be critical for performance enhancement. The framework’s effectiveness was further validated across various LLMs, confirming its robustness and applicability across diverse scenarios. Intelli-Dispatch-SQL offers a high-performance and generalizable solution for Text-to-SQL in power dispatching, paving the way for more efficient and intelligent power system management. • Introduces Intelli-Dispatch-SQL, a novel LLM-based agent framework for text-to-SQL in power dispatching, addressing the need for reliable data querying. • Integrates Chain-of-Thought reasoning within the agent framework to enhance the reliability and accuracy of SQL generation. • Incorporates an intent recognition module to accurately interpret user queries within the power dispatching context. • Employs a robust SQL validation module to rigorously verify both syntactic and semantic correctness of generated SQL. • Demonstrates significant performance improvements over existing Text-to-SQL models, achieving substantial gains in both Exact Match and Execution Accuracy.
Authors
- Xuanang Gui (ORCID: https://orcid.org/0000-0002-5666-0417)
- Binbin Ni (ORCID: https://orcid.org/0000-0001-6644-0728)
- Zhijun Shen
- Zhiyong Meng (ORCID: https://orcid.org/0000-0002-2527-1056)
- Junhua Zhao (ORCID: https://orcid.org/0000-0001-5446-2655)
- Xinlei Cai (ORCID: https://orcid.org/0000-0003-3627-3150)
- Yuheng Cheng (ORCID: https://orcid.org/0009-0008-9268-2067)
Institutions
- Chinese University of Hong Kong, Shenzhen (CN)
- China Southern Power Grid (China) (CN)
- Power Grid Corporation (India) (IN)
Publication Details
- Journal
- Energy and AI
- Published
- 2025-08-26
- DOI
- https://doi.org/10.1016/j.egyai.2025.100591
- Citations
- 3
- Primary Topic
- Power Systems and Technologies
- Type
- article
- Field-Weighted Citation Impact
- 2.19
Funders
- National Natural Science Foundation of China
- Guangdong Power Grid Company