Lune

NeurIPS2023顶会

DIN-SQL: Decomposed In-Context Learning of Text-to-SQL with Self-Correction

Mohammadreza Pourreza, Davood Rafiei

摘要

There is currently a significant gap between the performance of fine-tuned models and prompting approaches using Large Language Models (LLMs) on the challenging task of text-to-SQL, as evaluated on datasets such as Spider. To improve the performance of LLMs in the reasoning process, we study how decomposing the task into smaller sub-tasks can be effective. In particular, we show that breaking down the generation problem into sub-problems and feeding the solutions of those sub-problems into LLMs can be an effective approach for significantly improving their performance. Our experiments with three LLMs show that this approach consistently improves their simple few-shot performance by roughly 10%, pushing the accuracy of LLMs towards SOTA or surpassing it. On the holdout test set of Spider, the SOTA, in terms of execution accuracy, was 79.9 and the new SOTA at the time of this writing using our approach is 85.3. Our approach with in-context learning beats many heavily fine-tuned models by at least 5%. Additionally, when evaluated on the BIRD benchmark, our approach achieved an execution accuracy of 55.9%, setting a new SOTA on its holdout test set.

问 Lune

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

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

已有 126 篇顶会 Paper 引用了它。别等审稿人问起,先弄清它们发现了什么。

可以从这些问题问起

Lune 可以查阅

全文 · 引用它的顶会 Paper · 相关的 Paper

获取答案

免费开始,无需绑卡

脉络

  • DSPy: Compiling Declarative Language Model Calls into State-of-the-Art Pipelines 引用了 Automatic Chain of Thought Prompting in Large Language Models
  • DSPy: Compiling Declarative Language Model Calls into State-of-the-Art Pipelines 引用了 Large Language Models are Zero-Shot Reasoners
  • DSPy: Compiling Declarative Language Model Calls into State-of-the-Art Pipelines 引用了 Language Models are Few-Shot Learners
  • DSPy: Compiling Declarative Language Model Calls into State-of-the-Art Pipelines 引用了 Chain-of-Thought Prompting Elicits Reasoning in Large Language Models
  • Automatic Chain of Thought Prompting in Large Language Models 引用了 Large Language Models are Zero-Shot Reasoners
  • Automatic Chain of Thought Prompting in Large Language Models 引用了 Language Models are Few-Shot Learners
  • Automatic Chain of Thought Prompting in Large Language Models 引用了 Finetuned Language Models are Zero-Shot Learners
  • Automatic Chain of Thought Prompting in Large Language Models 引用了 Chain-of-Thought Prompting Elicits Reasoning in Large Language Models
  • Large Language Models are Zero-Shot Reasoners 引用了 Language Models are Few-Shot Learners
  • Large Language Models are Zero-Shot Reasoners 引用了 Chain-of-Thought Prompting Elicits Reasoning in Large Language Models
  • Text-to-SQL Empowered by Large Language Models: A Benchmark Evaluation 引用了 Large Language Models are Zero-Shot Reasoners
  • 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
  • The Dawn of Natural Language to SQL: Are We Fully Ready? [Experiment, Analysis & Benchmark ] 引用了 CodeS: Towards Building Open-source Language Models for Text-to-SQL
  • The Dawn of Natural Language to SQL: Are We Fully Ready? [Experiment, Analysis & Benchmark ] 引用了 Chain-of-Thought Prompting Elicits Reasoning in Large Language Models
  • AgentBench: Evaluating LLMs as Agents 引用了 Text-to-SQL Empowered by Large Language Models: A Benchmark Evaluation
  • AgentBench: Evaluating LLMs as Agents 引用了 Language Models are Few-Shot Learners
  • AgentBench: Evaluating LLMs as Agents 引用了 Finetuned Language Models are Zero-Shot Learners
  • AgentBench: Evaluating LLMs as Agents 引用了 Chain-of-Thought Prompting Elicits Reasoning in Large Language Models
  • CodeS: Towards Building Open-source Language Models for Text-to-SQL 引用了 Text-to-SQL Empowered by Large Language Models: A Benchmark Evaluation
  • CodeS: Towards Building Open-source Language Models for Text-to-SQL 引用了 Language Models are Few-Shot Learners
  • CodeS: Towards Building Open-source Language Models for Text-to-SQL 引用了 Chain-of-Thought Prompting Elicits Reasoning in Large Language Models
  • Finetuned Language Models are Zero-Shot Learners 引用了 Language Models are Few-Shot Learners
  • Finetuned Language Models are Zero-Shot Learners 引用了 Chain-of-Thought Prompting Elicits Reasoning in Large Language Models
它引用的引用它的从左到右按年份排列,引用越多,位置越高。

引用它的顶会 Paper126

  1. AgentBench: Evaluating LLMs as AgentsXiao Liu, Hao Yu, Hanchen Zhang, Yifan Xu 等ICLR 2024 · 748 次引用
  2. Text-to-SQL Empowered by Large Language Models: A Benchmark EvaluationDawei Gao, Haibin Wang, Yaliang Li, Xiuyu Sun 等VLDB 2024 · 609 次引用
  3. DSPy: Compiling Declarative Language Model Calls into State-of-the-Art PipelinesOmar Khattab, Arnav Singhvi, Paridhi Maheshwari, Zhiyuan Zhang 等ICLR 2024 · 170 次引用
  4. 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 次引用
  5. CodeS: Towards Building Open-source Language Models for Text-to-SQLHaoyang Li, Jing Zhang, Hanbing Liu, Ju Fan 等SIGMOD 2024 · 124 次引用

它引用的 Paper16

  1. Language Models are Few-Shot LearnersTom B. Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah 等NeurIPS 2020 · 64,255 次引用
  2. Chain-of-Thought Prompting Elicits Reasoning in Large Language ModelsJason Wei, Xuezhi Wang, Dale Schuurmans, Maarten Bosma 等NeurIPS 2022 · 22,562 次引用
  3. Large Language Models are Zero-Shot ReasonersTakeshi Kojima, Shixiang Shane Gu, Machel Reid, Yutaka Matsuo 等NeurIPS 2022 · 8,168 次引用
  4. Finetuned Language Models are Zero-Shot LearnersJason Wei, Maarten Bosma, Vincent Y. Zhao, Kelvin Guu 等ICLR 2022 · 4,966 次引用
  5. Automatic Chain of Thought Prompting in Large Language ModelsZhuosheng Zhang, Aston Zhang, Mu Li, Alex SmolaICLR 2023 · 234 次引用

相关 Paper

  1. ACT-SQL: In-Context Learning for Text-to-SQL with Automatically-Generated Chain-of-ThoughtHanchong Zhang, Ruisheng Cao, Lu Chen, Hongshen Xu 等EMNLP Findings 2023 · 54 次引用
  2. Enhancing Text-to-SQL Capabilities of Large Language Models: A Study on Prompt Design StrategiesLinyong Nan, Yilun Zhao, Weijin Zou, Narutatsu Ri 等EMNLP Findings 2023 · 49 次引用
  3. STaR-SQL: Self-Taught Reasoner for Text-to-SQLMingqian He, Yongliang Shen, Wenqi Zhang, Qiuying Peng 等ACL 2025
  4. Decomposition for Enhancing Attention: Improving LLM-based Text-to-SQL through Workflow ParadigmYuanzhen Xie, Xinzhou Jin, Tao Xie, Mingxiong Lin 等ACL Findings 2024 · 34 次引用
  5. Optimizing Reasoning for Text-to-SQL with Execution FeedbackBohan Zhai, Canwen Xu, Yuxiong He, Zhewei YaoACL Findings 2025 · 8 次引用
黄昏的海面,两侧是细线勾勒的悬崖