Divide and Prompt: Chain of Thought Prompting for Text-to-SQL
- URL: http://arxiv.org/abs/2304.11556v1
- Date: Sun, 23 Apr 2023 06:52:35 GMT
- Title: Divide and Prompt: Chain of Thought Prompting for Text-to-SQL
- Authors: Xiping Liu and Zhao Tan
- Abstract summary: Chain-of-thought (CoT) prompting combined with large language models (LLMs) have achieved encouraging results on complex reasoning tasks.
We propose Divide-and-Prompt, which first divides the task into subtasks, and then approach each subtask through CoT.
- Score: 0.03807314298073299
- License: http://arxiv.org/licenses/nonexclusive-distrib/1.0/
- Abstract: 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.
Related papers
- PTD-SQL: Partitioning and Targeted Drilling with LLMs in Text-to-SQL [54.304872649870575]
Large Language Models (LLMs) have emerged as powerful tools for Text-to-sense tasks.
In this study, we propose that employing query group partitioning allows LLMs to focus on learning the thought processes specific to a single problem type.
arXiv Detail & Related papers (2024-09-21T09:33:14Z) - QDA-SQL: Questions Enhanced Dialogue Augmentation for Multi-Turn Text-to-SQL [14.321009553155285]
Fine-tuned models often face challenges with multi-turn Text-to-answer tasks.
It is desired to enhance LLMs to handle multiple types of questions in multi-turn Text-to-answer tasks.
arXiv Detail & Related papers (2024-06-15T10:54:54Z) - Decoupling SQL Query Hardness Parsing for Text-to-SQL [2.30258928355895]
We introduce an innovative framework for Text-to-coupled based on decoupling query hardness parsing.
This framework decouples the Text-to-couple task based on query hardness by analyzing questions and schemas, simplifying the multi-hardness task into a single-hardness challenge.
arXiv Detail & Related papers (2023-12-11T07:20:46Z) - SQLPrompt: In-Context Text-to-SQL with Minimal Labeled Data [54.69489315952524]
"Prompt" is designed to improve the few-shot prompting capabilities of Text-to-LLMs.
"Prompt" outperforms previous approaches for in-context learning with few labeled data by a large margin.
We show that emphPrompt outperforms previous approaches for in-context learning with few labeled data by a large margin.
arXiv Detail & Related papers (2023-11-06T05:24:06Z) - ACT-SQL: In-Context Learning for Text-to-SQL with
Automatically-Generated Chain-of-Thought [24.1320473171017]
Large Language Models (LLMs) have been proven to have strong abilities in various domains and tasks.
We design our chain-of-thought (CoT) prompt with a similar method to schema linking.
We extend our in-context learning method to the multi-turn text-to-context task.
arXiv Detail & Related papers (2023-10-26T12:16:25Z) - Retrieval-augmented GPT-3.5-based Text-to-SQL Framework with
Sample-aware Prompting and Dynamic Revision Chain [21.593701177605652]
We propose a Text-to-aware prompting framework, involving a sample and a dynamic revision chain.
Our approach incorporates sample demonstrations and fine-grained information related to the given question.
To generate executable and accuratesqls without human intervention, we design a dynamic revision chain which iteratively adapts fine-grained feedback.
arXiv Detail & Related papers (2023-07-11T07:16:22Z) - SQL-PaLM: Improved Large Language Model Adaptation for Text-to-SQL (extended) [53.95151604061761]
This paper introduces the framework for enhancing Text-to- filtering using large language models (LLMs)
With few-shot prompting, we explore the effectiveness of consistency decoding with execution-based error analyses.
With instruction fine-tuning, we delve deep in understanding the critical paradigms that influence the performance of tuned LLMs.
arXiv Detail & Related papers (2023-05-26T21:39:05Z) - MIGA: A Unified Multi-task Generation Framework for Conversational
Text-to-SQL [48.34333725045152]
Most state-of-the-art conversational text-to-generative methods are incompatible with pre-trained language models (PLMs), such as T5.
We present a two-stage unified MultI-task Generation frAmeme (MIGA) that leverages PLMs' ability to tackle conversational text-to-work.
arXiv Detail & Related papers (2022-12-19T07:14:32Z) - Towards Generalizable and Robust Text-to-SQL Parsing [77.18724939989647]
We propose a novel TKK framework consisting of Task decomposition, Knowledge acquisition, and Knowledge composition to learn text-to- parsing in stages.
We show that our framework is effective in all scenarios and state-of-the-art performance on the Spider, SParC, and Co. datasets.
arXiv Detail & Related papers (2022-10-23T09:21:27Z) - A Survey on Text-to-SQL Parsing: Concepts, Methods, and Future
Directions [102.8606542189429]
The goal of text-to-corpora parsing is to convert a natural language (NL) question to its corresponding structured query language () based on the evidences provided by databases.
Deep neural networks have significantly advanced this task by neural generation models, which automatically learn a mapping function from an input NL question to an output query.
arXiv Detail & Related papers (2022-08-29T14:24:13Z)
This list is automatically generated from the titles and abstracts of the papers in this site.
This site does not guarantee the quality of this site (including all information) and is not responsible for any consequences.