J* E* C* N* U* N* S* ›› 2026, Vol. 2026 ›› Issue (5): 196-207.doi: 10.3969/j.issn.1000-5641.2026.05.016

• Data Intelligent Applications • Previous Articles    

SQL4Domain: A highly reliable Text-to-SQL generation and verification framework for domain-specific electric power data

Yuanlai ZHANG1,2, Qingning WANG2, Ming GAO1,*()   

  1. 1. School of Data Science and Engineering, East China Normal University, Shanghai 200062, China
    2. Tellhow Software Co., Ltd., Nanchang 330096, China
  • Received:2026-07-07 Online:2026-09-25 Published:2026-09-12
  • Contact: Ming GAO E-mail:mgao@dase.ecnu.edu.cn

Abstract:

Owing to the rapid development of large language model (LLM), Text-to-SQL tasks have progressed significantly in recent years. However, applying Text-to-SQL to specialized domains such as finance, healthcare, and power engineering remains challenging owing to complex user queries and highly specialized database schemas. This paper proposes a highly reliable Text-to-SQL parsing framework named SQL4Domain, with the power industry considered as a typical application scenario. The framework first utilizes domain-specific knowledge bases to implement user-query intent recognition and key entity extraction. Subsequently, it generates structured query language (SQL) statements combined with domain knowledge prompts. Finally, it improves the accuracy and reliability of SQL statements via multi-strategic knowledge verification. Experiments on the power-industry dataset reveal that SQL4Domain significantly outperforms existing methods in terms of execution accuracy, with a performance improvement of 21.65% compared with the mainstream DAIL method.

Key words: Text-to-SQL, domain-specific big data, large language models

CLC Number: