Metasql: A Generate-then-Rank Framework for Natural Language to SQL Translation
Not on the map. Why?
Abstract (arXiv)
The Natural Language Interface to Databases (NLIDB) empowers non-technical users with database access through intuitive natural language (NL) interactions. Advanced approaches, utilizing neural sequence-to-sequence models or large-scale language models, typically employ auto-regressive decoding to generate unique SQL queries sequentially. While these translation models have greatly improved the overall translation accuracy, surpassing 70% on NLIDB benchmarks, the use of auto-regressive decoding to generate single SQL queries may result in sub-optimal outputs, potentially leading to erroneous translations. In this paper, we propose Metasql, a unified generate-then-rank framework that can be flexibly incorporated with existing NLIDBs to consistently improve their translation accuracy. Metasql introduces query metadata to control the generation of better SQL query candidates and uses learning-to-rank algorithms to retrieve globally optimized queries. Specifically, Metasql first breaks down the meaning of the given NL query into a set of possible query metadata, representing the basic concepts of the semantics. These metadata are then used as language constraints to steer the underlying translation model toward generating a set of candidate SQL queries. Finally, Metasql ranks the candidates to identify the best matching one for the given NL query. Extensive experiments are performed to study Metasql on two public NLIDB benchmarks. The results show that the performance of the translation models can be effectively improved using Metasql.
Key facts. Cited by 17 papers in the map (data through 7 Oct 2026). Builds on 53 of its 74 references that are in the map. First posted on arXiv 27 Feb 2024.
Builds on
53 of 74 references.
References · 53
- 2018BERT: Pre-training of Deep Bidirectional Transformers for Language Understandingcited by 40,204
- 2014Adam: A Method for Stochastic Optimizationcited by 36,960
- 2020Language Models are Few-Shot Learnerscited by 32,199
- 2023GPT-4 Technical Reportcited by 18,132
- 2019RoBERTa: A Robustly Optimized BERT Pretraining Approachcited by 13,266
- 2021Training Verifiers to Solve Math Word Problemscited by 9,743
- 2014Neural Machine Translation by Jointly Learning to Align and Translatecited by 4,530
- 2020Dense Passage Retrieval for Open-Domain Question Answeringcited by 3,779
- 2021Program Synthesis with Large Language Modelscited by 3,509
- 2014Sequence to Sequence Learning with Neural Networkscited by 2,974
- 2022Competition-Level Code Generation with AlphaCodecited by 1,427
- 2018Hierarchical Neural Story Generationcited by 1,182
38 more
- 2018Spider: A Large-Scale Human-Labeled Dataset for Complex and Cross-Domain Semantic Parsing and Text-to-SQL Taskcited by 1,120
- 2015A Diversity-Promoting Objective Function for Neural Conversation Modelscited by 1,068
- 2020Approximate Nearest Neighbor Negative Contrastive Learning for Dense Text Retrievalcited by 846
- 2019Latent Retrieval for Weakly Supervised Open Domain Question Answeringcited by 691
- 2023DIN-SQL: Decomposed In-Context Learning of Text-to-SQL with Self-Correctioncited by 465
- 2019RAT-SQL: Relation-Aware Schema Encoding and Linking for Text-to-SQL Parserscited by 420
- 2018The Web as a Knowledge-base for Answering Complex Questionscited by 409
- 2019Towards Complex Text-to-SQL in Cross-Domain Database with Intermediate Representationcited by 210
- 2019Multi-Stage Document Ranking with BERTcited by 200
- 2023RESDSQL: Decoupling Schema Linking and Skeleton Parsing for Text-to-SQLcited by 191
- 2020GraPPa: Grammar-Augmented Pre-Training for Table Semantic Parsingcited by 171
- 2017SQLNet: Generating Structured Queries From Natural Language Without Reinforcement Learningcited by 135
- 2020Bridging Textual and Tabular Data for Cross-Domain Text-to-SQL Semantic Parsingcited by 133
- 2020Break It Down: A Question Understanding Benchmarkcited by 131
- 2022A Survey of Controllable Text Generation using Transformer-based Pre-trained Language Modelscited by 128
- 2019Multi-hop Reading Comprehension through Question Decomposition and Rescoringcited by 119
- 2021LGESQL: Line Graph Enhanced Text-to-SQL Model with Mixed Local and Non-Local Relationscited by 119
- 2023A comprehensive evaluation of ChatGPT's zero-shot Text-to-SQL capabilitycited by 118
- 2022Evaluating the Text-to-SQL Capabilities of Large Language Modelscited by 101
- 2020SmBoP: Semi-autoregressive Bottom-up Semantic Parsingcited by 97
- 2020Graph Structured Network for Image-Text Matchingcited by 93
- 2019Editing-Based SQL Query Generation for Cross-Domain Context-Dependent Questionscited by 80
- 2019Representing Schema Structure with Graph Neural Networks for Text-to-SQL Parsingcited by 74
- 2021Natural SQL: Making SQL Easier to Infer from Natural Language Specificationscited by 66
- 2020Learning Contextual Representations for Semantic Parsing with Generation-Augmented Pre-Trainingcited by 65
- 2021Rethink Training of BERT Rerankers in Multi-Stage Retrieval Pipelinecited by 65
- 2022SummaReranker: A Multi-Task Mixture-of-Experts Re-ranking Framework for Abstractive Summarizationcited by 61
- 2022Critic-Guided Decoding for Controlled Text Generationcited by 45
- 2019Global Reasoning over Database Structures for Text-to-SQL Parsingcited by 43
- 2023ScienceBenchmark: A Complex Real-World Benchmark for Evaluating Natural Language to SQL Systemscited by 42
- 2021NeuralNDCG: Direct Optimisation of a Ranking Metric via Differentiable Relaxation of Sortingcited by 39
- 2016Mutual Information and Diverse Decoding Improve Neural Machine Translationcited by 35
- 2018SQL-to-Text Generation with Graph-to-Sequence Modelcited by 31
- 2023Interleaving Pre-Trained Language Models and Large Language Models for Zero-Shot NL2SQL Generationcited by 24
- 2019Bridging the Semantic Gap with SQL Query Logs in Natural Language Interfaces to Databasescited by 15
- 2018Neural Compositional Denotational Semantics for Question Answeringcited by 11
- 2023Toward Unified Controllable Text Generation via Regular Expression Instructioncited by 7
- 2022MIGA: A Unified Multi-task Generation Framework for Conversational Text-to-SQLcited by 5
50 most cited of 53 All 53 (JSON)
Built on by
Citing papers per year: 2024: 6; 2025: 7; 2026: 4.
17 papers.
Sort:
By area:
- 2024Next-Generation Database Interfaces: A Survey of LLM-based Text-to-SQLcited by 118
- 2024A Survey on Employing Large Language Models for Text-to-SQL Taskscited by 67
- 2024A Survey of Text-to-SQL in the Era of LLMs: Where are we, and where are we going?cited by 54
- 2024PURPLE: Making a Large Language Model a Better SQL Writercited by 34
- 2024Text2Cypher: Bridging Natural Language and Graph Databasescited by 30
- 2025Reliable Text-to-SQL with Adaptive Abstentioncited by 19
- 2024From Natural Language to SQL: Review of LLM-based Text-to-SQL Systemscited by 15
- 2025LearNAT: Learning NL2SQL with AST-guided Task Decomposition for Large Language Modelscited by 7
- 2025Enhancing Text2Cypher with Schema Filteringcited by 6
- 2025Exploring the Landscape of Text-to-SQL with Large Language Models: Progresses, Challenges and Opportunitiescited by 4
- 2025Schema-R1: A reasoning training approach for schema linking in Text-to-SQL Taskcited by 1
- 2025Text2VectorSQL: Towards a Unified Interface for Vector Search and SQL Queriescited by 0
5 more
- 2025OsmT: Bridging OpenStreetMap Queries and Natural Language with Open-source Tag-aware Language Modelscited by 0
- 2026Accurate Table Question Answering with Accessible LLMscited by 0
- 2026Database Context Compression for Text-to-SQL on Real-World Large Databasescited by 0
- 2026Benchmarking Text-to-SQL under Role-Based Access Controlcited by 0
- 2026LIMIT: Less Is More for Instruction Tuning in Text-to-SQLcited by 0
- 2026LIMIT: Less Is More for Instruction Tuning in Text-to-SQL21 Sep 2026
- 2026Benchmarking Text-to-SQL under Role-Based Access Control24 Jul 2026
- 2026Database Context Compression for Text-to-SQL on Real-World Large Databases26 Jun 2026
- 2026Accurate Table Question Answering with Accessible LLMs6 Jan 2026
- 2025OsmT: Bridging OpenStreetMap Queries and Natural Language with Open-source Tag-aware Language Models4 Dec 2025
- 2025Text2VectorSQL: Towards a Unified Interface for Vector Search and SQL Queries29 Jun 2025
- 2025Schema-R1: A reasoning training approach for schema linking in Text-to-SQL Task13 Jun 2025
- 2025Exploring the Landscape of Text-to-SQL with Large Language Models: Progresses, Challenges and Opportunities28 May 2025
- 2025Enhancing Text2Cypher with Schema Filtering8 May 2025
- 2025LearNAT: Learning NL2SQL with AST-guided Task Decomposition for Large Language Models3 Apr 2025
- 2025Reliable Text-to-SQL with Adaptive Abstention18 Jan 2025
- 2024Text2Cypher: Bridging Natural Language and Graph Databases13 Dec 2024
5 more
- 2024From Natural Language to SQL: Review of LLM-based Text-to-SQL Systems1 Oct 2024
- 2024A Survey of Text-to-SQL in the Era of LLMs: Where are we, and where are we going?9 Aug 2024
- 2024A Survey on Employing Large Language Models for Text-to-SQL Tasks21 Jul 2024
- 2024Next-Generation Database Interfaces: A Survey of LLM-based Text-to-SQL12 Jun 2024
- 2024PURPLE: Making a Large Language Model a Better SQL Writer29 Mar 2024
- 2024Next-Generation Database Interfaces: A Survey of LLM-based Text-to-SQLcited by 118
- 2024A Survey on Employing Large Language Models for Text-to-SQL Taskscited by 67
- 2024A Survey of Text-to-SQL in the Era of LLMs: Where are we, and where are we going?cited by 54
- 2024PURPLE: Making a Large Language Model a Better SQL Writercited by 34
- 2024Text2Cypher: Bridging Natural Language and Graph Databasescited by 30
- 2025Reliable Text-to-SQL with Adaptive Abstentioncited by 19
- 2025LearNAT: Learning NL2SQL with AST-guided Task Decomposition for Large Language Modelscited by 7
- 2025Enhancing Text2Cypher with Schema Filteringcited by 6
- 2025Exploring the Landscape of Text-to-SQL with Large Language Models: Progresses, Challenges and Opportunitiescited by 4
- 2025Schema-R1: A reasoning training approach for schema linking in Text-to-SQL Taskcited by 1
- 2025Text2VectorSQL: Towards a Unified Interface for Vector Search and SQL Queriescited by 0
- 2025OsmT: Bridging OpenStreetMap Queries and Natural Language with Open-source Tag-aware Language Modelscited by 0
12 most cited of 16 All 16 (JSON)
- 2026LIMIT: Less Is More for Instruction Tuning in Text-to-SQL21 Sep 2026
- 2026Benchmarking Text-to-SQL under Role-Based Access Control24 Jul 2026
- 2026Database Context Compression for Text-to-SQL on Real-World Large Databases26 Jun 2026
- 2026Accurate Table Question Answering with Accessible LLMs6 Jan 2026
- 2025OsmT: Bridging OpenStreetMap Queries and Natural Language with Open-source Tag-aware Language Models4 Dec 2025
- 2025Text2VectorSQL: Towards a Unified Interface for Vector Search and SQL Queries29 Jun 2025
- 2025Schema-R1: A reasoning training approach for schema linking in Text-to-SQL Task13 Jun 2025
- 2025Exploring the Landscape of Text-to-SQL with Large Language Models: Progresses, Challenges and Opportunities28 May 2025
- 2025Enhancing Text2Cypher with Schema Filtering8 May 2025
- 2025LearNAT: Learning NL2SQL with AST-guided Task Decomposition for Large Language Models3 Apr 2025
- 2025Reliable Text-to-SQL with Adaptive Abstention18 Jan 2025
- 2024Text2Cypher: Bridging Natural Language and Graph Databases13 Dec 2024
12 newest of 16 All 16 (JSON)