Table of Contents
Fetching ...

Text-to-SQL in the Wild: A Naturally-Occurring Dataset Based on Stack Exchange Data

Moshe Hazoom, Vibhor Malik, Ben Bogin

TL;DR

This work introduces SEDE, a naturally occurring Text-to-SQL dataset drawn from Stack Exchange Data Explorer to address the realism gap in semantic parsing benchmarks. It analyzes 12,023 NL-SQL pairs, highlights under-specification and parameterization as core challenges, and proposes PCM-F1 as a partial-match evaluation metric over exact SQL matches. Experiments with T5-based baselines reveal a substantial performance gap between SEDE and standard datasets like Spider, underscoring the need for real-world benchmarks and robust evaluation in Text-to-SQL. The dataset, cleaning methodology, evaluation framework, and findings aim to advance generalization of Text-to-SQL models to real-world usage scenarios.

Abstract

Most available semantic parsing datasets, comprising of pairs of natural utterances and logical forms, were collected solely for the purpose of training and evaluation of natural language understanding systems. As a result, they do not contain any of the richness and variety of natural-occurring utterances, where humans ask about data they need or are curious about. In this work, we release SEDE, a dataset with 12,023 pairs of utterances and SQL queries collected from real usage on the Stack Exchange website. We show that these pairs contain a variety of real-world challenges which were rarely reflected so far in any other semantic parsing dataset, propose an evaluation metric based on comparison of partial query clauses that is more suitable for real-world queries, and conduct experiments with strong baselines, showing a large gap between the performance on SEDE compared to other common datasets.

Text-to-SQL in the Wild: A Naturally-Occurring Dataset Based on Stack Exchange Data

TL;DR

This work introduces SEDE, a naturally occurring Text-to-SQL dataset drawn from Stack Exchange Data Explorer to address the realism gap in semantic parsing benchmarks. It analyzes 12,023 NL-SQL pairs, highlights under-specification and parameterization as core challenges, and proposes PCM-F1 as a partial-match evaluation metric over exact SQL matches. Experiments with T5-based baselines reveal a substantial performance gap between SEDE and standard datasets like Spider, underscoring the need for real-world benchmarks and robust evaluation in Text-to-SQL. The dataset, cleaning methodology, evaluation framework, and findings aim to advance generalization of Text-to-SQL models to real-world usage scenarios.

Abstract

Most available semantic parsing datasets, comprising of pairs of natural utterances and logical forms, were collected solely for the purpose of training and evaluation of natural language understanding systems. As a result, they do not contain any of the richness and variety of natural-occurring utterances, where humans ask about data they need or are curious about. In this work, we release SEDE, a dataset with 12,023 pairs of utterances and SQL queries collected from real usage on the Stack Exchange website. We show that these pairs contain a variety of real-world challenges which were rarely reflected so far in any other semantic parsing dataset, propose an evaluation metric based on comparison of partial query clauses that is more suitable for real-world queries, and conduct experiments with strong baselines, showing a large gap between the performance on SEDE compared to other common datasets.

Paper Structure

This paper contains 31 sections, 1 equation, 1 figure, 6 tables.

Figures (1)

  • Figure 1: An example for sub-tree matching.