UCS-SQL: Uniting Content and Structure for Enhanced Semantic Bridging In Text-to-SQL

Zhenhe Wu, Zhongqiu Li, JieZhangChinaTele JieZhangChinaTele, Zhongjiang He, Jian Yang, Yu Zhao, Ruiyu Fang, Bing Wang, Hongyan Xie, Shuangyong Song, Zhoujun Li


Abstract
With the rapid advancement of large language models (LLMs), recent researchers have increasingly focused on the superior capabilities of LLMs in text/code understanding and generation to tackle text-to-SQL tasks. Traditional approaches adopt schema linking to first eliminate redundant tables and columns and prompt LLMs for SQL generation. However, they often struggle with accurately identifying corresponding tables and columns, due to discrepancies in naming conventions between natural language questions (NL) and database schemas. Besides, existing methods overlook the challenge of effectively transforming structure information from NL into SQL. To address these limitations, we introduce UCS-SQL, a novel text-to-SQL framework, uniting both content and structure pipes to bridge the gap between NL and SQL. Specifically, the content pipe focuses on identifying key content within the original content, while the structure pipe is dedicated to transforming the linguistic structure from NL to SQL. Additionally, we strategically selects few-shot examples by considering both the SQL Skeleton and Question Expression (SS-QE selection method), thus providing targeted examples for SQL generation. Experimental results on BIRD and Spider demonstrate the effectiveness of our UCS-SQL framework.
Anthology ID:
2025.findings-acl.427
Volume:
Findings of the Association for Computational Linguistics: ACL 2025
Month:
July
Year:
2025
Address:
Vienna, Austria
Editors:
Wanxiang Che, Joyce Nabende, Ekaterina Shutova, Mohammad Taher Pilehvar
Venues:
Findings | WS
SIG:
Publisher:
Association for Computational Linguistics
Note:
Pages:
8156–8168
Language:
URL:
https://preview.aclanthology.org/acl25-workshop-ingestion/2025.findings-acl.427/
DOI:
Bibkey:
Cite (ACL):
Zhenhe Wu, Zhongqiu Li, JieZhangChinaTele JieZhangChinaTele, Zhongjiang He, Jian Yang, Yu Zhao, Ruiyu Fang, Bing Wang, Hongyan Xie, Shuangyong Song, and Zhoujun Li. 2025. UCS-SQL: Uniting Content and Structure for Enhanced Semantic Bridging In Text-to-SQL. In Findings of the Association for Computational Linguistics: ACL 2025, pages 8156–8168, Vienna, Austria. Association for Computational Linguistics.
Cite (Informal):
UCS-SQL: Uniting Content and Structure for Enhanced Semantic Bridging In Text-to-SQL (Wu et al., Findings 2025)
Copy Citation:
PDF:
https://preview.aclanthology.org/acl25-workshop-ingestion/2025.findings-acl.427.pdf