T5QL: Taming language models for SQL generation

09/21/2022
by   Samuel Arcadinho, et al.
0

Automatic SQL generation has been an active research area, aiming at streamlining the access to databases by writing natural language with the given intent instead of writing SQL. Current SOTA methods for semantic parsing depend on LLMs to achieve high predictive accuracy on benchmark datasets. This reduces their applicability, since LLMs requires expensive GPUs. Furthermore, SOTA methods are ungrounded and thus not guaranteed to always generate valid SQL. Here we propose T5QL, a new SQL generation method that improves the performance in benchmark datasets when using smaller LMs, namely T5-Base, by 13pp when compared against SOTA methods. Additionally, T5QL is guaranteed to always output valid SQL using a context-free grammar to constrain SQL generation. Finally, we show that dividing semantic parsing in two tasks, candidate SQLs generation and candidate re-ranking, is a promising research avenue that can reduce the need for large LMs.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
08/29/2022

A Survey on Text-to-SQL Parsing: Concepts, Methods, and Future Directions

Text-to-SQL parsing is an essential and challenging task. The goal of te...
research
05/30/2019

Grammar-based Neural Text-to-SQL Generation

The sequence-to-sequence paradigm employed by neural text-to-SQL models ...
research
07/09/2018

Robust Text-to-SQL Generation with Execution-Guided Decoding

We consider the problem of neural semantic parsing, which translates nat...
research
06/07/2023

ScienceBenchmark: A Complex Real-World Benchmark for Evaluating Natural Language to SQL Systems

Natural Language to SQL systems (NL-to-SQL) have recently shown a signif...
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
01/24/2023

Studying the Characteristics of SQL-related Development Tasks: An Empirical Study

A key function of a software system is its ability to facilitate the man...
research
11/13/2018

Translating Natural Language to SQL using Pointer-Generator Networks and How Decoding Order Matters

Translating natural language to SQL queries for table-based question ans...

Please sign up or login with your details

Forgot password? Click here to reset