One-Shot Learning for Text-to-SQL Generation

04/26/2019
by   Dongjun Lee, et al.
0

Most deep learning approaches for text-to-SQL generation are limited to the WikiSQL dataset, which only supports very simple queries. Recently, template-based and sequence-to-sequence approaches were proposed to support complex queries, which contain join queries, nested queries, and other types. However, Finegan-Dollak et al. (2018) demonstrated that both the approaches lack the ability to generate SQL of unseen templates. In this paper, we propose a template-based one-shot learning model for the text-to-SQL generation so that the model can generate SQL of an untrained template based on a single example. First, we classify the SQL template using the Matching Network that is augmented by our novel architecture Candidate Search Network. Then, we fill the variable slots in the predicted template using the Pointer Network. We show that our model outperforms state-of-the-art approaches for various text-to-SQL datasets in two aspects: 1) the SQL generation accuracy for the trained templates, and 2) the adaptability to the unseen SQL templates based on a single example without any additional training.

READ FULL TEXT
research
04/18/2019

Recursive and Clause-Wise Decoding for Complex and Cross-Domain Text-to-SQL Generation

Most deep learning approaches for text-to-SQL generation are limited to ...
research
04/18/2019

Clause-Wise and Recursive Decoding for Complex and Cross-Domain Text-to-SQL Generation

Most deep learning approaches for text-to-SQL generation are limited to ...
research
04/07/2021

Efficient and Accurate In-Database Machine Learning with SQL Code Generation in Python

Following an analysis of the advantages of SQL-based Machine Learning (M...
research
04/19/2023

MixPro: Simple yet Effective Data Augmentation for Prompt-based Learning

Prompt-based learning reformulates downstream tasks as cloze problems by...
research
04/19/2022

CodexDB: Generating Code for Processing SQL Queries using GPT-3 Codex

CodexDB is an SQL processing engine whose internals can be customized vi...
research
10/20/2019

Byte-Pair Encoding for Text-to-SQL Generation

Neural sequence-to-sequence models provide a competitive approach to the...
research
08/29/2019

Zero-shot Text-to-SQL Learning with Auxiliary Task

Recent years have seen great success in the use of neural seq2seq models...

Please sign up or login with your details

Forgot password? Click here to reset