Skip to content

SQLStructEval: Structural Evaluation of LLM Text-to-SQL Generation

Apr 2026 · arXiv.org · Vol abs/2604.06736 · 1 citation · 51 references
Computer Science

TL;DR

SQLStructEval is introduced, a framework that analyzes this behavior through canonical abstract syntax tree representations and adopts a pipeline that first generates structured intermediate representations and then deterministically compiles them into SQL, improving execution accuracy and structural agreement among correct outputs.

Abstract

In Text-to-SQL tasks, large language models can generate structurally different SQL queries that return correct answers for the same intent. We call this phenomenon execution-correct structural divergence (ECSD). We introduce SQLStructEval, a framework that analyzes this behavior through canonical abstract syntax tree representations. We quantify structural diversity and agreement across generations. Experiments with different LLMs on multiple Text-to-SQL datasets, including Spider, document ECSD across models and datasets. Furthermore, our experiments demonstrate that generated queries are sensitive to question paraphrases and schema presentation. To address ECSD, we adopt a pipeline that first generates structured intermediate representations and then deterministically compiles them into SQL, improving execution accuracy and structural agreement among correct outputs. Structural analysis thus provides an additional diagnostic perspective that complements execution-based evaluation. Code is available at https://xanderzhou2022.github.io/AACL2026-SQLSTRUCTEVAL/.

View source

Similar papers

Preprint Oct 2026

Post-SQLFix: Property-Guided Repair of LLM-Generated SQL with Runtime Verification

Large Language Models (LLMs) for Text-to-SQL frequently generate queries with syntax errors, invalid identifier references, or violations of SQL scoping and typing rules. Repairing these errors is a program correctness problem, yet existing approaches rely on Execution Feedback (EF), whose symptom-level, dialect-specif...

Zhi-Hao Guo, Zong-Han Wu, Yi Shao et al. · 0 citations
Open access Nov 2026

SCDS: Data Synthesis with Structural Priors via Large Language Models for Text-to-SQL

Text-to-SQL data synthesis must expand semantic coverage without losing the relational structure of observed queries. Existing SQL offers evidence of plausible join and nesting patterns, but reusing queries alone limits the range of training examples; unconstrained generation, in contrast, risks implausible structures...

Hao-Yu Zhang, Ying-Qi Zou, Xiang-Yu Wang et al. · 0 citations
Open access Oct 2026

Cracking Query Bottlenecks: Towards Efficiency-Oriented Text-to-SQL Generation

Text-to-SQL models translate natural language questions into SQL, enabling non-technical users to access databases. However, most existing research focuses on correctness, neglecting query efficiency. In this paper, we address the challenge of evaluating the execution efficiency of generated SQL in Text-to-SQL by intro...

Li Lin, Yun-Feng Shen, Ling-Feng Bao et al. · 0 citations
Preprint Nov 2026

SQLoom: Set-Contrastive Learning of Syntactic, Semantic, and Logical Dependencies for Text-to-SQL

Text-to-SQL translates natural language questions into SQL queries, enabling database access without writing SQL. Fine-tuning open-weight large language models (LLMs) is cost-effective, but existing methods treat SQL as ordinary text and optimize token-level likelihood without explicitly modeling its syntactic, semanti...

Hao Fu, De-Gang Sun, Wan Wei et al. · 0 citations
Review Oct 2026

Reimagining Text-to-SQL: A Survey of Large Language Model Architectures and Strategies

Text-to-SQL systems translate natural language questions into executable SQL queries, democratizing access to relational data. Early approaches relied on handcrafted rules and template matching, while subsequent neural methods introduced encoder-decoder architectures, schema linking, and constrained decoding to handle...

Shikhar Dave, Bhaskarjit Sarmah, Stefano Pasquali · 0 citations
Preprint Nov 2026

GRIPS: An Empirical Study of Pre-SQL Grounding Information for SQL Generation

Text-to-SQL systems answer natural language questions over structured data, but can fail before SQL generation by linking question mentions to the wrong table, column, value, or relation. Even valid SQL can then return an incorrect answer. This raises a central question: What pre-SQL information helps a SQL generator,...

Ekata Mitra, Yu-Fei Tao, Kamalamalini Nagasundaram et al. · 0 citations

Related blog posts

MIT News · Artificial Intelligence Nov 17, 2026

Learning the language of machine learning

By studying the computational foundations of language learning, Associate Professor Jacob Andreas builds intelligent systems that can communicate effectively with humans.

We use cookies to run the site and, with your consent, for analytics and to show ads. See our Cookie Policy.