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

04/21/2023
by   Mohammadreza Pourreza, et al.
0

We study the problem of decomposing a complex text-to-sql task into smaller sub-tasks and how such a decomposition can significantly improve the performance of Large Language Models (LLMs) in the reasoning process. There is currently a significant gap between the performance of fine-tuned models and prompting approaches using LLMs on challenging text-to-sql datasets such as Spider. We show that SQL queries, despite their declarative structure, can be broken down into sub-problems and the solutions of those sub-problems can be fed into LLMs to significantly improve their performance. Our experiments with three LLMs show that this approach consistently improves their performance by roughly 10 beating large fine-tuned models on the holdout Spider dataset.

READ FULL TEXT

page 3

page 5

page 31

research
04/23/2023

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

Chain-of-thought (CoT) prompting combined with large language models (LL...
research
05/21/2023

Enhancing Few-shot Text-to-SQL Capabilities of Large Language Models: A Study on Prompt Design Strategies

In-context learning (ICL) has emerged as a new approach to various natur...
research
02/03/2020

Bertrand-DR: Improving Text-to-SQL using a Discriminative Re-ranker

To access data stored in relational databases, users need to understand ...
research
05/04/2022

Measuring and Improving Compositional Generalization in Text-to-SQL via Component Alignment

In text-to-SQL tasks – as in much of NLP – compositional generalization ...
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
10/07/2021

mRAT-SQL+GAP:A Portuguese Text-to-SQL Transformer

The translation of natural language questions to SQL queries has attract...
research
09/21/2022

T5QL: Taming language models for SQL generation

Automatic SQL generation has been an active research area, aiming at str...

Please sign up or login with your details

Forgot password? Click here to reset