Interactive Text-to-SQL Generation via Editable Step-by-Step Explanations
Preprint
Abstract
Relational databases play an important role in business, science, and more. However, many users cannot fully unleash the analytical power of relational databases, because they are not familiar with database languages such as SQL. Many techniques have been proposed to automatically generate SQL from natural language, but they suffer from two issues: (1) they still make many mistakes, particularly for complex queries, and (2) they do not provide a flexible way for non-expert users to validate and refine incorrect queries. To address these issues, we introduce a new interaction mechanism that allows users to directly edit a step-by-step explanation of a query to fix errors. Our experiments on multiple datasets, as well as a user study with 24 participants, demonstrate that our approach can achieve better performance than multiple SOTA approaches. Our code and datasets are available at https://github.com/magic-YuanTian/STEPS.Keywords
All Related Versions
This publication has 33 references indexed in Scilit:
- An Empirical Study of Model Errors and User Error Discovery and Repair Strategies in Natural Language Database Queries2023
- DIY: Assessing the Correctness of Natural Language to SQL Systems2021
- An Interactive NL2SQL Approach with Reuse Strategy2021
- Building Natural Language Interfaces to Web APIs2017
- NaLIR2014
- SPARQL2NL2013
- Logos2012
- Explaining structured queries in natural language2010
- Developing a natural language interface to complex dataACM Transactions on Database Systems, 1978
- A general method applicable to the search for similarities in the amino acid sequence of two proteinsJournal of Molecular Biology, 1970