Weakly Supervised Mapping of Natural Language to SQL through Question Decomposition

by   Tomer Wolfson, et al.

Natural Language Interfaces to Databases (NLIDBs), where users pose queries in Natural Language (NL), are crucial for enabling non-experts to gain insights from data. Developing such interfaces, by contrast, is dependent on experts who often code heuristics for mapping NL to SQL. Alternatively, NLIDBs based on machine learning models rely on supervised examples of NL to SQL mappings (NL-SQL pairs) used as training data. Such examples are again procured using experts, which typically involves more than a one-off interaction. Namely, each data domain in which the NLIDB is deployed may have different characteristics and therefore require either dedicated heuristics or domain-specific training examples. To this end, we propose an alternative approach for training machine learning-based NLIDBs, using weak supervision. We use the recently proposed question decomposition representation called QDMR, an intermediate between NL and formal query languages. Recent work has shown that non-experts are generally successful in translating NL to QDMR. We consequently use NL-QDMR pairs, along with the question answers, as supervision for automatically synthesizing SQL queries. The NL questions and synthesized SQL are then used to train NL-to-SQL models, which we test on five benchmark datasets. Extensive experiments show that our solution, requiring zero expert annotations, performs competitively with models trained on expert annotated data.


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...

Learning to Generate Structured Queries from Natural Language with Indirect Supervision

Generating structured query language (SQL) from natural language is an e...

Translating synthetic natural language to database queries: a polyglot deep learning framework

The number of databases as well as their size and complexity is increasi...

Interactive Text-to-SQL Generation via Editable Step-by-Step Explanations

Relational databases play an important role in this Big Data era. Howeve...

Natural language to SQL in low-code platforms

One of the developers' biggest challenges in low-code platforms is retri...

FANDA: A Novel Approach to Perform Follow-up Query Analysis

Recent work on Natural Language Interfaces to Databases (NLIDB) has attr...

nvBench: A Large-Scale Synthesized Dataset for Cross-Domain Natural Language to Visualization Task

NL2VIS - which translates natural language (NL) queries to corresponding...

Please sign up or login with your details

Forgot password? Click here to reset