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

Xiping Liu, Zhao Tan
4/23/2023
cs.CLcs.AI

No confident code implementation found for this paper.

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.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. Any repos shown below are weak matches — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{liu2023divide,
  title  = {Divide and Prompt: Chain of Thought Prompting for Text-to-SQL},
  author = {Xiping Liu and Zhao Tan},
  year   = {2023},
  eprint = {2304.11556},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2304.11556v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2304.11556.svg)](https://codeofpaper.com/paper/2304.11556)

Discussion