Lune

EMNLP Findings2025

Pi-SQL: Enhancing Text-to-SQL with Fine-Grained Guidance from Pivot Programming Languages

Yongdong Chi, Hanqing Wang, Yun Chen, Yan Yang, Jian Yang, Zonghan Yang, Xiao Yan, Guanhua Chen

摘要

Text-to-SQL transforms the user queries from natural language to executable SQL programs, enabling non-experts to interact with complex databases. Existing prompt-based methods craft meticulous text guidelines and examples to facilitate SQL generation, but their accuracy is hindered by the large semantic gap between the texts and the low-resource SQL programs. In this work, we propose PI-SQL, which incorporates the high-resource Python program as a pivot to bridge between the natural language query and SQL program. In particular, PI-SQL first generates Python programs that provide fine-grained step-by-step guidelines in their code blocks or comments, and then produces an SQL program following the guidance of each Python program. The final SQL program matches the reference Python program's query results and, through selection from candidates generated by different strategies, achieves superior execution speed, with a reward-based valid efficiency score up to 4.55 higher than the best-performing baseline. Extensive experiments demonstrate the effectiveness of PI-SQL, which improves the execution accuracy of the best-performing baseline by up to 3.20.

问 Lune

几分钟读透这篇 Paper,不用再花一下午。

Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。

可以从这些问题问起

Lune 可以查阅

全文 · 相关的 Paper

获取答案

免费开始,无需绑卡

脉络

  • Teaching Large Language Models to Self-Debug 引用了 Self-Consistency Improves Chain of Thought Reasoning in Language Models
  • Text-to-SQL Empowered by Large Language Models: A Benchmark Evaluation 引用了 RESDSQL: Decoupling Schema Linking and Skeleton Parsing for Text-to-SQL
  • Text-to-SQL Empowered by Large Language Models: A Benchmark Evaluation 引用了 Self-Consistency Improves Chain of Thought Reasoning in Language Models
  • The Dawn of Natural Language to SQL: Are We Fully Ready? [Experiment, Analysis & Benchmark ] 引用了 RESDSQL: Decoupling Schema Linking and Skeleton Parsing for Text-to-SQL
  • The Dawn of Natural Language to SQL: Are We Fully Ready? [Experiment, Analysis & Benchmark ] 引用了 Text-to-SQL Empowered by Large Language Models: A Benchmark Evaluation
它引用的引用它的从左到右按年份排列,引用越多,位置越高。

它引用的 Paper12

  1. Teaching Large Language Models to Self-DebugXinyun Chen, Maxwell Lin, Nathanael Schärli, Denny ZhouICLR 2024 · 1,085 次引用
  2. Self-Consistency Improves Chain of Thought Reasoning in Language ModelsXuezhi Wang, Jason Wei, Dale Schuurmans, Quoc V. Le 等ICLR 2023 · 681 次引用
  3. Text-to-SQL Empowered by Large Language Models: A Benchmark EvaluationDawei Gao, Haibin Wang, Yaliang Li, Xiuyu Sun 等VLDB 2024 · 609 次引用
  4. RESDSQL: Decoupling Schema Linking and Skeleton Parsing for Text-to-SQLHaoyang Li, Jing Zhang, Cuiping Li, Hong ChenAAAI 2023 · 343 次引用
  5. The Dawn of Natural Language to SQL: Are We Fully Ready? [Experiment, Analysis & Benchmark ]Boyan Li, Yuyu Luo, Chengliang Chai, Guoliang Li 等VLDB 2024 · 137 次引用

相关 Paper

  1. CORES: Code-Oriented Reasoning for Complex Text-to-SQL and Generalizable TableQAMeng Zhang, Ruochun Jin, Yuanxi Peng, Wenjing Yang 等ACL Findings 2026
  2. EXPO-SQL: Execution-based Clause-level Policy Optimization for Text-to-SQLJaehoon Lee, CheolWon Na, Suyoung Bae, Jin-Seop Lee 等ACL Findings 2026 · 1 次引用
  3. SQLens: An End-to-End Framework for Error Detection and Correction in Text-to-SQLYue Gong, Chuan Lei, Xiao Qin, Kapil Vaidya 等NeurIPS 2025 · 21 次引用
  4. Enhancing Text-to-SQL Parsing through Question Rewriting and Execution-Guided RefinementWenxin Mao, Ruiqi Wang, Jiyu Guo, Jichuan Zeng 等ACL Findings 2024 · 19 次引用
  5. Natural SQL: Making SQL Easier to Infer from Natural Language SpecificationsYujian Gan, Xinyun Chen, Jinxia Xie, Matthew Purver 等EMNLP Findings 2021 · 88 次引用
黄昏的海面,两侧是细线勾勒的悬崖