Exploring Chain-of-Thought Style Prompting for Text-to-SQL
Chang-You Tai, Ziru Chen, Tianshu Zhang, Xiang Deng, Huan Sun

TL;DR
This paper investigates how chain-of-thought prompting can improve large language models' reasoning for text-to-SQL tasks, proposing a new method that significantly enhances performance over existing prompting techniques.
Contribution
The paper introduces a novel chain-of-thought prompting approach tailored for text-to-SQL, demonstrating substantial performance improvements over standard and least-to-most prompting methods.
Findings
Iterative prompting may be unnecessary for text-to-SQL.
Detailed reasoning steps can cause error propagation.
Proposed method improves Spider dataset scores by over 5 points.
Abstract
In-context learning with large language models (LLMs) has recently caught increasing attention due to its superior few-shot performance on various tasks. However, its performance on text-to-SQL parsing still has much room for improvement. In this paper, we hypothesize that a crucial aspect of LLMs to improve for text-to-SQL parsing is their multi-step reasoning ability. Thus, we systematically study how to enhance LLMs' reasoning ability through chain of thought (CoT) style prompting, including the original chain-of-thought prompting (Wei et al., 2022b) and least-to-most prompting (Zhou et al., 2023). Our experiments demonstrate that iterative prompting as in Zhou et al. (2023) may be unnecessary for text-to-SQL parsing, and using detailed reasoning steps tends to have more error propagation issues. Based on these findings, we propose a new CoT-style prompting method for text-to-SQL…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsTopic Modeling · Explainable Artificial Intelligence (XAI) · Machine Learning and Data Classification
MethodsChain-of-thought prompting
