Text-to-SQL Error Correction with Language Models of Code

05/22/2023
by   Ziru Chen, et al.
0

Despite recent progress in text-to-SQL parsing, current semantic parsers are still not accurate enough for practical use. In this paper, we investigate how to build automatic text-to-SQL error correction models. Noticing that token-level edits are out of context and sometimes ambiguous, we propose building clause-level edit models instead. Besides, while most language models of code are not specifically pre-trained for SQL, they know common data structures and their operations in programming languages such as Python. Thus, we propose a novel representation for SQL queries and their edits that adheres more closely to the pre-training corpora of language models of code. Our error correction model improves the exact set match accuracy of different parsers by 2.4-6.5 and obtains up to 4.3 point absolute improvement over two strong baselines. Our code and data are available at https://github.com/OSU-NLP-Group/Auto-SQL-Correction.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
09/10/2021

PICARD: Parsing Incrementally for Constrained Auto-Regressive Decoding from Language Models

Large pre-trained language models for textual data have an unconstrained...
research
05/24/2023

Are Pre-trained Language Models Useful for Model Ensemble in Chinese Grammatical Error Correction?

Model ensemble has been in widespread use for Grammatical Error Correcti...
research
05/03/2020

Encoder-Decoder Models Can Benefit from Pre-trained Masked Language Models in Grammatical Error Correction

This paper investigates how to effectively incorporate a pre-trained mas...
research
08/14/2016

Numerically Grounded Language Models for Semantic Error Correction

Semantic error detection and correction is an important task for applica...
research
05/25/2023

Uncovering and Categorizing Social Biases in Text-to-SQL

Content Warning: This work contains examples that potentially implicate ...
research
04/11/2018

Reference-less Measure of Faithfulness for Grammatical Error Correction

We propose USim, a semantic measure for Grammatical Error Correction (G...
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