Synthetic SQL Column Descriptions and Their Impact on Text-to-SQL Performance

Niklas Wretblad, Oskar Holmström, Erik Larsson, Axel Wiksäter, Oscar Söderlund +5 more
8/8/2024
10 citations
cs.CLcs.AIcs.DB

No official code found. Best implementation: vpt101/Synthetic-SQL-Column-Descriptions-for-Text-to-SQL (1 star, Python, last commit 2024-11-05). 1 more below.

Abstract

Relational databases often suffer from uninformative descriptors of table contents, such as ambiguous columns and hard-to-interpret values, impacting both human users and text-to-SQL models. In this paper, we explore the use of large language models (LLMs) to automatically generate detailed natural language descriptions for SQL database columns, aiming to improve text-to-SQL performance and automate metadata creation.

Show full abstract

We create a dataset of gold column descriptions based on the BIRD-Bench benchmark, manually refining its column descriptions and creating a taxonomy for categorizing column difficulty. We then evaluate several different LLMs in generating column descriptions across the columns and different difficulties in the dataset, finding that models unsurprisingly struggle with columns that exhibit inherent ambiguity, highlighting the need for manual expert input. We also find that incorporating such generated column descriptions consistently enhances text-to-SQL model performance, particularly for larger models like GPT-4o, Qwen2 72B and Mixtral 22Bx8. Notably, Qwen2-generated descriptions, containing by annotators deemed superfluous information, outperform manually curated gold descriptions, suggesting that models benefit from more detailed metadata than humans expect. Future work will investigate the specific features of these high-performing descriptions and explore other types of metadata, such as numerical reasoning and synonyms, to further improve text-to-SQL systems. The dataset, annotations and code will all be made available.

View on arXivView PDF

Code Implementations(2)

Code implementations of this paper
RepositoryTypeStarsLanguageLicenseLast commit
vpt101/Synthetic-SQL-Column-Descriptions-for-Text-to-SQLCommunity1Python–2024-11-05
niklaswretblad/Synthetic-SQL-Column-Descriptions-for-Text-to-SQLCommunity0Python–2024-11-05

Code for the paper "Synthetic SQL Column Descriptions and Their Impact on Text-to-SQL Performance"

00PythonMay 23, 20242 years ago
databasesdocumentation-generatorllmmetadatasql+1 more

Code for the paper "Synthetic SQL Column Descriptions and Their Impact on Text-to-SQL Performance"

10PythonJan 30, 20252 years ago

Similar Papers

Cite this paper

@article{wretblad2024synthetic,
  title  = {Synthetic SQL Column Descriptions and Their Impact on Text-to-SQL Performance},
  author = {Niklas Wretblad and Oskar Holmström and Erik Larsson and Axel Wiksäter and Oscar Söderlund and Hjalmar Öhman and Ture Pontén and Martin Forsberg and Martin Sörme and Fredrik Heintz},
  year   = {2024},
  eprint = {2408.04691},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2408.04691v4}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2408.04691.svg)](https://codeofpaper.com/paper/2408.04691)

Discussion