An Orchestrated, Safety-Constrained LLM Pipeline for Querying Relational Databases and Natural-Language Summarization: Extending to Graph-Augmented Verifiability

This paper presents a comprehensive, production-oriented framework that enables Large Language Models (LLMs) to safely query relational databases and generate natural-language summaries of results. Unlike traditional Text-to-SQL approaches, the proposed system emphasizes enterprise-grade safety, verifiability, and correctness by integrating multi-layered safeguards, schema-aware reasoning, and graph-validated planning. The framework introduces a novel Graph-Constrained Chain-of-Thought (GC-CoT) module that compels LLMs to generate explicit join plans rooted in a knowledge graph representation of the database schema. A deterministic Graph Validator Module (GVM) verifies these plans, preventing hallucinated relationships and ensuring semantically valid SQL generation. The system further incorporates a Trusted Execution Grammar, AST-based SQL validation, schema summarization, sampling, and multi-dialect strategy abstraction to guarantee secure, read-only execution across heterogeneous database engines. Extensive evaluations on enterprise datasets and public benchmarks (Spider, BIRD) demonstrate substantial improvements in execution accuracy, semantic correctness, safety, and reliability compared with baseline LLM-only or pruning-based approaches. The paper also provides a detailed threat model, cost/latency optimization strategies, multimodal extensions, and implementation guidelines suitable for real-world deployment in data-intensive enterprises.

Publication Details

Journal
Zenodo (CERN European Organization for Nuclear Research)
Published
2025-11-23
DOI
https://doi.org/10.5281/zenodo.17686958
Primary Topic
Graph Theory and Algorithms
Type
article
Field-Weighted Citation Impact
0.00
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

An Orchestrated, Safety-Constrained LLM Pipeline for Querying Relational Databases and Natural-Language Summarization: Extending to Graph-Augmented Verifiability

Zenodo (CERN European Organization for Nuclear Research)
Graph Theory and Algorithms
article

An Orchestrated, Safety-Constrained LLM Pipeline for Querying Relational Databases and Natural-Language Summarization: Extending to Graph-Augmented Verifiability

article en

Abstract

This paper presents a comprehensive, production-oriented framework that enables Large Language Models (LLMs) to safely query relational databases and generate natural-language summaries of results. Unlike traditional Text-to-SQL approaches, the proposed system emphasizes enterprise-grade safety, verifiability, and correctness by integrating multi-layered safeguards, schema-aware reasoning, and graph-validated planning. The framework introduces a novel Graph-Constrained Chain-of-Thought (GC-CoT) module that compels LLMs to generate explicit join plans rooted in a knowledge graph representation of the database schema. A deterministic Graph Validator Module (GVM) verifies these plans, preventing hallucinated relationships and ensuring semantically valid SQL generation. The system further incorporates a Trusted Execution Grammar, AST-based SQL validation, schema summarization, sampling, and multi-dialect strategy abstraction to guarantee secure, read-only execution across heterogeneous database engines. Extensive evaluations on enterprise datasets and public benchmarks (Spider, BIRD) demonstrate substantial improvements in execution accuracy, semantic correctness, safety, and reliability compared with baseline LLM-only or pruning-based approaches. The paper also provides a detailed threat model, cost/latency optimization strategies, multimodal extensions, and implementation guidelines suitable for real-world deployment in data-intensive enterprises.

Zenodo (CERN European Organization for Nuclear Research)
Openalex Percentile: Top 41%
Graph Theory and Algorithms
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.

An Orchestrated, Safety-Constrained LLM Pipeline for Querying Relational Databases and Natural-Language Summarization: Extending to Graph-Augmented Verifiability · Zenodo (CERN European Organization for Nuclear Research) (2025) | TGRS Research Map | TGRS