Editing-Based SQL Query Generation for Cross-Domain Context-Dependent Questions

Rui Zhang, Tao Yu, He Yang Er, Sungrok Shim, Eric Xue +5 more
9/2/2019
cs.CL

Official code: ryanzhumich/editsql (207 stars, MIT, last commit 2024-07-25).

Abstract

We focus on the cross-domain context-dependent text-to-SQL generation task. Based on the observation that adjacent natural language questions are often linguistically dependent and their corresponding SQL queries tend to overlap, we utilize the interaction history by editing the previous predicted query to improve the generation quality. Our editing mechanism views SQL as sequences and reuses generation results at the token level in a simple manner. It is flexible to change individual tokens and robust to error propagation. Furthermore, to deal with complex table structures in different domains, we employ an utterance-table encoder and a table-aware decoder to incorporate the context of the user utterance and the table schema. We evaluate our approach on the SParC dataset and demonstrate the benefit of editing compared with the state-of-the-art baselines which generate SQL from scratch. Our code is available at https://github.com/ryanzhumich/sparc_atis_pytorch.

View on arXivView PDF

Code Implementations(1)

MIT
20765Shell, PythonJun 22, 20192 years agoMIT

Similar Papers

Cite this paper

@article{zhang2019editingbased,
  title  = {Editing-Based SQL Query Generation for Cross-Domain Context-Dependent Questions},
  author = {Rui Zhang and Tao Yu and He Yang Er and Sungrok Shim and Eric Xue and Xi Victoria Lin and Tianze Shi and Caiming Xiong and Richard Socher and Dragomir Radev},
  year   = {2019},
  eprint = {1909.00786},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/1909.00786}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/1909.00786.svg)](https://codeofpaper.com/paper/1909.00786)

Discussion