Training effective Text-to-SQL models remains challenging due to the scarcity of high-quality, diverse, and structurally complex datasets. Existing methods either rely on limited human-annotated corpora, or synthesize datasets directly by simply prompting LLMs without explicit control over SQL structures, often resulting in limited structural diversity and complexity. To address this, we introduce EvolSQL, a structure-aware data synthesis framework that evolves SQL queries from seed data into richer and more semantically diverse forms. EvolSQL starts with an exploratory Query-SQL expansion to broaden question diversity and improve schema coverage, and then applies an adaptive directional evolution strategy using six atomic transformation operators derived from the SQL Abstract Syntax Tree to progressively increase query complexity across relational, predicate, aggregation, and nesting dimensions. An execution-grounded SQL refinement module and schema-aware deduplication further ensure the creation of high-quality, structurally diverse mapping pairs. Experimental results show that a 7B model fine-tuned on our data outperforms one trained on the much larger SynSQL dataset using only 1/18 of the data.
Text-to-SQL as Dual-State Reasoning: Integrating Adaptive Context and Progressive Generation
School of Computer Science, Guangdong University of Technology(广东工业大学计算机科学学院);College of Science, Shantou University(汕头大学科学学院);Peng Cheng Laboratory(鹏城实验室)
LearNAT: Learning NL2SQL with AST-guided Task Decomposition for Large Language Models
School of Computer Science, Peking University(北京大学计算机科学系);Key Laboratory of High Confidence Software Technologies, Ministry of Education(教育部高可信软件技术重点实验室);Big Data Technology Research Center, Nanhu Laboratory(纳米实验室大数据技术研究中心);National Engineering Research Center For Software Engineering, Peking University(北京大学软件工程国家工程研究中心);Peking University Information Technology Institute (Tianjin Binhai)(北京大学信息技术研究院(天津滨海));School of Computer Sciences, Beijing University of Posts and Telecommunications(北京邮电大学计算机科学系);Huawei Technologies Co., Ltd(华为技术有限公司);Seed, ByteDance Inc.(字节跳动公司)