EUVIMEDSkopri EUVIMED
Open access · CC BY 4.0

SQL Statement Generation Enhanced Through the Fusion of Large Language Models and Knowledge Graphs

Bohan Wang, Xuhong Yu, Xin Zheng

Electronics · 2026-01-07 · 15 (2) · 278

DOI: 10.3390/electronics15020278 ↗

At a glance

Journal article in Electronics, published online on 2026-01-07. Written by Bohan Wang and 2 co-authors. Cited 3 times so far (Crossref); 22 references. The full text is freely available (open access, CC BY 4.0). Funded by: Guizhou Science and Technology Program, Guanghe Fund, National Natural Science Foundation of China.

AstrattDettalji biblijografiċiCiteRelated studies

Abstract (original language)

Current mainstream SQL generation approaches remain insufficient in capturing the semantic information of structured data and handling complex query tasks. To address the challenges of hallucination and accuracy degradation in large language model (LLM)-based SQL generation, this paper proposes an enhanced SQL generation framework that integrates knowledge graphs with large language models. The proposed method introduces an SQL-KG-Verifier module, which synergizes the structured information of knowledge graphs with the generative capabilities of LLMs. By incorporating the verifier, the framework collaboratively refines SQL statements to ensure higher structural consistency, improved accuracy, and enhanced interpretability. Specifically, the verifier employs the entities and relational information retrieved from the knowledge graph as proxies to validate and revise the model outputs, effectively reducing generation errors. Experimental results demonstrate that on the BIRD and Spider datasets, the proposed method achieves execution accuracies of 52.71% and 77.26%, respectively—representing improvements of 19.93 and 21.27 percentage points over baseline models. Moreover, the approach exhibits superior adaptability and generation performance in complex and domain-specific query scenarios.

Funding

  • Guizhou Science and Technology Program
  • Guanghe Fund
  • National Natural Science Foundation of China
  • Guizhou Key Laboratory of Advanced

Cite

APA

Wang, B., Yu, X., & Zheng, X. (2026). SQL Statement Generation Enhanced Through the Fusion of Large Language Models and Knowledge Graphs. Electronics, 15(2), 278. https://doi.org/10.3390/electronics15020278

Vancouver

Wang B, Yu X, Zheng X. SQL Statement Generation Enhanced Through the Fusion of Large Language Models and Knowledge Graphs. Electronics. 2026;15(2):278. doi:10.3390/electronics15020278

BibTeX
@article{Wang2026,
  author = {Wang, Bohan and Yu, Xuhong and Zheng, Xin},
  title = {SQL Statement Generation Enhanced Through the Fusion of Large Language Models and Knowledge Graphs},
  journal = {Electronics},
  year = {2026},
  volume = {15},
  number = {2},
  pages = {278},
  doi = {10.3390/electronics15020278}
}
Start for free →