Domain-specific SQL generation with LLMs: A hybrid framework combining knowledge graphs and retrieval-augmentation

Municipal sewer asset management personnel without SQL expertise often rely on additional IT support to retrieve necessary information from their organization’s database, which hinders timely decision-making. This study presents a schema-guided RAG, a hybrid text-to-SQL framework that integrates structured knowledge graphs (KGs) for explicit join-path and relational reasoning with retrieval-augmented generation (RAG) for contextual grounding. Designed for domain-specific and multi-relational databases, the schema-guided RAG enables large language models (LLMs) to reason over complex relational structures while mitigating data scarcity through semantic retrieval. The framework was evaluated using both proprietary and open-source LLMs and applied in the sewer asset management domain. Results show consistent improvements in execution accuracy, logical form accuracy, and exact match, with particularly strong gains for queries requiring multi-table joins and nested logic. The schema-guided RAG offers an interpretable approach to natural language queries, supporting efficient, accurate, and explainable access to infrastructure data.

Authors

Institutions

Publication Details

Journal
Advanced Engineering Informatics
Published
2026-03-09
DOI
https://doi.org/10.1016/j.aei.2026.104560
Primary Topic
Semantic Web and Ontologies
Type
article
Field-Weighted Citation Impact
0.00
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

Domain-specific SQL generation with LLMs: A hybrid framework combining knowledge graphs and retrieval-augmentation

Yongwei Shan, Hossein Khaleghian, Ifeoluwa Awotunde, Dharmendra Reddy Chitte et al.
Advanced Engineering Informatics
Semantic Web and Ontologies
article

Domain-specific SQL generation with LLMs: A hybrid framework combining knowledge graphs and retrieval-augmentation

Yongwei Shan, Hossein Khaleghian, Ifeoluwa Awotunde, Dharmendra Reddy Chitte, Weihua Sheng
article en

Abstract

Municipal sewer asset management personnel without SQL expertise often rely on additional IT support to retrieve necessary information from their organization’s database, which hinders timely decision-making. This study presents a schema-guided RAG, a hybrid text-to-SQL framework that integrates structured knowledge graphs (KGs) for explicit join-path and relational reasoning with retrieval-augmented generation (RAG) for contextual grounding. Designed for domain-specific and multi-relational databases, the schema-guided RAG enables large language models (LLMs) to reason over complex relational structures while mitigating data scarcity through semantic retrieval. The framework was evaluated using both proprietary and open-source LLMs and applied in the sewer asset management domain. Results show consistent improvements in execution accuracy, logical form accuracy, and exact match, with particularly strong gains for queries requiring multi-table joins and nested logic. The schema-guided RAG offers an interpretable approach to natural language queries, supporting efficient, accurate, and explainable access to infrastructure data.

Advanced Engineering InformaticsVol. 73
Oklahoma State University (US)
Openalex Percentile: Top 33%
Semantic Web and Ontologies
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.

Domain-specific SQL generation with LLMs: A hybrid framework combining knowledge graphs and retrieval-augmentation — Yongwei Shan, Hossein Khaleghian, et al. · Advanced Engineering Informatics (2026) | TGRS Research Map | TGRS