Divide and Prompt: Chain of Thought Prompting for Text-to-SQL

04/23/2023
by   Xiping Liu, et al.
0

Chain-of-thought (CoT) prompting combined with large language models (LLMs) have achieved encouraging results on complex reasoning tasks. Text-to-SQL is a critical semantic parsing task that converts natural language questions into SQL statements, involving a complex reasoning process. However, there is little work about using CoT prompting to activate LLM's reasoning capabilities on Text-to-SQL tasks. In this work, we propose a new paradigm for prompting Text-to-SQL tasks, called Divide-and-Prompt, which first divides the task into subtasks, and then approach each subtask through CoT. We present 3 prompting-based methods to enhance the Text-to-SQL ability of LLMs. Experiments show that these prompts guide LLMs to generate Text-to-SQL with higher execution accuracy.

READ FULL TEXT

page 3

page 4

page 6

research
05/23/2023

Exploring Chain-of-Thought Style Prompting for Text-to-SQL

Conventional supervised approaches for text-to-SQL parsing often require...
research
04/21/2023

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

We study the problem of decomposing a complex text-to-sql task into smal...
research
07/11/2023

Retrieval-augmented GPT-3.5-based Text-to-SQL Framework with Sample-aware Prompting and Dynamic Revision Chain

Text-to-SQL aims at generating SQL queries for the given natural languag...
research
08/29/2023

Text-to-SQL Empowered by Large Language Models: A Benchmark Evaluation

Large language models (LLMs) have emerged as a new paradigm for Text-to-...
research
10/20/2019

Byte-Pair Encoding for Text-to-SQL Generation

Neural sequence-to-sequence models provide a competitive approach to the...
research
03/15/2022

Evaluating the Text-to-SQL Capabilities of Large Language Models

We perform an empirical evaluation of Text-to-SQL capabilities of the Co...
research
04/26/2023

A Case-Based Reasoning Framework for Adaptive Prompting in Cross-Domain Text-to-SQL

Recent advancements in Large Language Models (LLMs), such as Codex, Chat...

Please sign up or login with your details

Forgot password? Click here to reset