PARSQL: Enhancing Text-to-SQL through SQL Parsing and Reasoning

Large language models (LLMs) have made significant strides in text-to-SQL tasks; however, small language models (SLMs) are crucial due to their low resource consumption and efficient inference for real-world deployment.Due to resource limitations, SLMs struggle to accurately interpret natural language questions and may overlook critical constraints, leading to challenges such as generating SQL with incorrect logic or incomplete conditions.To address these issues, we propose PARSQL, a novel framework that leverages SQL parsing and reasoning.Specifically, we design PARSer, an SQL parser that extracts constraints from SQL to generate sub-SQLs for data augmentation and producing step-by-step SQL explanations (reason) via both rule-based and LLMbased methods.We define a novel text-toreason task and incorporate it into multi-task learning, thereby enhancing text-to-SQL performance.Additionally, we employ an efficient SQL selection strategy that conducts direct similarity computation between the generated SQLs and their corresponding reasons to derive the final SQL for post-correction.Extensive experiments show that our PARSQL outperforms models with the same model size on the BIRD and Spider benchmarks.Notably, PARSQL-3B achieves 56.98% execution accuracy on BIRD, rivaling 7B models with significantly fewer parameters, setting a new state-ofthe-art performance.Code can be found here.

Authors

Publication Details

Published
2025-01-01
DOI
https://doi.org/10.18653/v1/2025.findings-acl.37
Citations
1
Primary Topic
Natural Language Processing Techniques
Type
article
Field-Weighted Citation Impact
2.48
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

PARSQL: Enhancing Text-to-SQL through SQL Parsing and Reasoning

Yaxun Dai, Min Hao, Haiqin Yang, Pingfu Chao
1 citations
Natural Language Processing Techniques
2.48
article

PARSQL: Enhancing Text-to-SQL through SQL Parsing and Reasoning

Yaxun Dai, Min Hao, Haiqin Yang, Pingfu Chao
article en
1 citations

Abstract

Large language models (LLMs) have made significant strides in text-to-SQL tasks; however, small language models (SLMs) are crucial due to their low resource consumption and efficient inference for real-world deployment.Due to resource limitations, SLMs struggle to accurately interpret natural language questions and may overlook critical constraints, leading to challenges such as generating SQL with incorrect logic or incomplete conditions.To address these issues, we propose PARSQL, a novel framework that leverages SQL parsing and reasoning.Specifically, we design PARSer, an SQL parser that extracts constraints from SQL to generate sub-SQLs for data augmentation and producing step-by-step SQL explanations (reason) via both rule-based and LLMbased methods.We define a novel text-toreason task and incorporate it into multi-task learning, thereby enhancing text-to-SQL performance.Additionally, we employ an efficient SQL selection strategy that conducts direct similarity computation between the generated SQLs and their corresponding reasons to derive the final SQL for post-correction.Extensive experiments show that our PARSQL outperforms models with the same model size on the BIRD and Spider benchmarks.Notably, PARSQL-3B achieves 56.98% execution accuracy on BIRD, rivaling 7B models with significantly fewer parameters, setting a new state-ofthe-art performance.Code can be found here.

Openalex Percentile: Top 9%
Natural Language Processing Techniques
2.48
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.

PARSQL: Enhancing Text-to-SQL through SQL Parsing and Reasoning — Yaxun Dai, Min Hao, et al. · (2025) | TGRS Research Map | TGRS