Benchmarking and Improving Text-to-SQL Generation under Ambiguity
- URL: http://arxiv.org/abs/2310.13659v1
- Date: Fri, 20 Oct 2023 17:00:53 GMT
- Title: Benchmarking and Improving Text-to-SQL Generation under Ambiguity
- Authors: Adithya Bhaskar, Tushar Tomar, Ashutosh Sathe, Sunita Sarawagi
- Abstract summary: We develop a novel benchmark called AmbiQT where each text is interpretable as two plausible SQLs due to lexical and/or structural ambiguity.
We propose LogicalBeam, a new decoding algorithm that navigates thesql logic space using a blend of plan-based template generation and constrained infilling.
- Score: 25.283118418288293
- License: http://arxiv.org/licenses/nonexclusive-distrib/1.0/
- Abstract: Research in Text-to-SQL conversion has been largely benchmarked against
datasets where each text query corresponds to one correct SQL. However, natural
language queries over real-life databases frequently involve significant
ambiguity about the intended SQL due to overlapping schema names and multiple
confusing relationship paths. To bridge this gap, we develop a novel benchmark
called AmbiQT with over 3000 examples where each text is interpretable as two
plausible SQLs due to lexical and/or structural ambiguity.
When faced with ambiguity, an ideal top-$k$ decoder should generate all valid
interpretations for possible disambiguation by the user. We evaluate several
Text-to-SQL systems and decoding algorithms, including those employing
state-of-the-art LLMs, and find them to be far from this ideal. The primary
reason is that the prevalent beam search algorithm and its variants, treat SQL
queries as a string and produce unhelpful token-level diversity in the top-$k$.
We propose LogicalBeam, a new decoding algorithm that navigates the SQL logic
space using a blend of plan-based template generation and constrained
infilling. Counterfactually generated plans diversify templates while
in-filling with a beam-search that branches solely on schema names provides
value diversity. LogicalBeam is up to $2.5$ times more effective than
state-of-the-art models at generating all candidate SQLs in the top-$k$ ranked
outputs. It also enhances the top-$5$ Exact and Execution Match Accuracies on
SPIDER and Kaggle DBQA.
Related papers
- SQLformer: Deep Auto-Regressive Query Graph Generation for Text-to-SQL Translation [16.07396492960869]
We introduce a novel Transformer architecture specifically crafted to perform text-to-gressive translation tasks.
Our model predicts queries as abstract syntax trees (ASTs) in an autore way, incorporating structural inductive bias in the executable and decoder layers.
arXiv Detail & Related papers (2023-10-27T00:13:59Z) - UNITE: A Unified Benchmark for Text-to-SQL Evaluation [72.72040379293718]
We introduce a UNIfied benchmark for Text-to-domain systems.
It is composed of publicly available text-to-domain datasets and 29K databases.
Compared to the widely used Spider benchmark, we introduce a threefold increase in SQL patterns.
arXiv Detail & Related papers (2023-05-25T17:19:52Z) - Prompting GPT-3.5 for Text-to-SQL with De-semanticization and Skeleton
Retrieval [17.747079214502673]
Text-to- is a task that converts a natural language question into a structured query language () to retrieve information from a database.
In this paper, we propose an LLM-based framework for Text-to- which retrieves helpful demonstration examples to prompt LLMs.
We design a de-semanticization mechanism that extracts question skeletons, allowing us to retrieve similar examples based on their structural similarity.
arXiv Detail & Related papers (2023-04-26T06:02:01Z) - Know What I don't Know: Handling Ambiguous and Unanswerable Questions
for Text-to-SQL [36.5089235153207]
Existing text-to-yourselfs generate a "plausible" query for an arbitrary user question.
We propose a simple yet effective generation approach that automatically produces ambiguous and unanswerable examples.
Experimental results show that our model achieves the best result on both real-world examples and generated examples.
arXiv Detail & Related papers (2022-12-17T15:32:00Z) - Towards Generalizable and Robust Text-to-SQL Parsing [77.18724939989647]
We propose a novel TKK framework consisting of Task decomposition, Knowledge acquisition, and Knowledge composition to learn text-to- parsing in stages.
We show that our framework is effective in all scenarios and state-of-the-art performance on the Spider, SParC, and Co. datasets.
arXiv Detail & Related papers (2022-10-23T09:21:27Z) - Improving Text-to-SQL Semantic Parsing with Fine-grained Query
Understanding [84.04706075621013]
We present a general-purpose, modular neural semantic parsing framework based on token-level fine-grained query understanding.
Our framework consists of three modules: named entity recognizer (NER), neural entity linker (NEL) and neural entity linker (NSP)
arXiv Detail & Related papers (2022-09-28T21:00:30Z) - A Survey on Text-to-SQL Parsing: Concepts, Methods, and Future
Directions [102.8606542189429]
The goal of text-to-corpora parsing is to convert a natural language (NL) question to its corresponding structured query language () based on the evidences provided by databases.
Deep neural networks have significantly advanced this task by neural generation models, which automatically learn a mapping function from an input NL question to an output query.
arXiv Detail & Related papers (2022-08-29T14:24:13Z) - S$^2$SQL: Injecting Syntax to Question-Schema Interaction Graph Encoder
for Text-to-SQL Parsers [66.78665327694625]
We propose S$2$, injecting Syntax to question- encoder graph for Text-to- relational parsing.
We also employ the decoupling constraint to induce diverse edge embedding, which further improves the network's performance.
Experiments on the Spider and robustness setting Spider-Syn demonstrate that the proposed approach outperforms all existing methods when pre-training models are used.
arXiv Detail & Related papers (2022-03-14T09:49:15Z) - Weakly Supervised Text-to-SQL Parsing through Question Decomposition [53.22128541030441]
We take advantage of the recently proposed question meaning representation called QDMR.
Given questions, their QDMR structures (annotated by non-experts or automatically predicted) and the answers, we are able to automatically synthesizesql queries.
Our results show that the weakly supervised models perform competitively with those trained on NL- benchmark data.
arXiv Detail & Related papers (2021-12-12T20:02:42Z) - Bertrand-DR: Improving Text-to-SQL using a Discriminative Re-ranker [1.049360126069332]
We propose a novel discnative re-ranker to improve the performance of generative text-to-rimi models.
We analyze relative strengths of the text-to-rimi and re-ranker models for optimal performance.
We demonstrate the effectiveness of the re-ranker by applying it to two state-of-the-art text-to-rimi models.
arXiv Detail & Related papers (2020-02-03T04:52:47Z)
This list is automatically generated from the titles and abstracts of the papers in this site.
This site does not guarantee the quality of this site (including all information) and is not responsible for any consequences.