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

02/03/2020
by   Amol Kelkar, et al.
10

To access data stored in relational databases, users need to understand the database schema and write a query using a query language such as SQL. To simplify this task, text-to-SQL models attempt to translate a user's natural language question to corresponding SQL query. Recently, several generative text-to-SQL models have been developed. We propose a novel discriminative re-ranker to improve the performance of generative text-to-SQL models by extracting the best SQL query from the beam output predicted by the text-to-SQL generator, resulting in improved performance in the cases where the best query was in the candidate list, but not at the top of the list. We build the re-ranker as a schema agnostic BERT fine-tuned classifier. We analyze relative strengths of the text-to-SQL and re-ranker models across different query hardness levels, and suggest how to combine the two models for optimal performance. We demonstrate the effectiveness of the re-ranker by applying it to two state-of-the-art text-to-SQL models, and achieve top 4 score on the Spider leaderboard at the time of writing this article.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
08/21/2019

X-SQL: reinforce schema representation with context

In this work, we present X-SQL, a new network architecture for the probl...
research
10/21/2020

DuoRAT: Towards Simpler Text-to-SQL Models

Recent research has shown that neural text-to-SQL models can effectively...
research
01/04/2022

Speech-to-SQL: Towards Speech-driven SQL Query Generation From Natural Language Question

Speech-based inputs have been gaining significant momentum with the popu...
research
01/10/2023

Structured Case-based Reasoning for Inference-time Adaptation of Text-to-SQL parsers

Inference-time adaptation methods for semantic parsing are useful for le...
research
09/12/2022

Optimising Fine-Grained Access Control Policy Enforcement for Database Queries. A Model-Driven Approach

Recently, we have proposed a model-driven approach for enforcing fine-gr...
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
10/19/2022

N-Best Hypotheses Reranking for Text-To-SQL Systems

Text-to-SQL task maps natural language utterances to structured queries ...

Please sign up or login with your details

Forgot password? Click here to reset