Querying Databases with Natural Language: The use of Large Language Models for Text-to-SQL tasks

The Text-to-SQL task involves generating SQL queries based on a given relational database and a Natural Language (NL) question. Although Large Language Models (LLMs) show good performance on well-known benchmarks, they are evaluated on databases with simpler schemas. This dissertation first evaluates their effectiveness on a complex and openly available database (Mondial) using GPT-3.5 and GPT-4. The results indicate that LLM-based models perform poorly and struggle with schema linking and joins. To improve accuracy, this work proposes the use of LLM-friendly views and data descriptions. A second experiment on a real-world database confirms that this approach enhances the accuracy of the Text-to-SQL task.

Authors

Institutions

Publication Details

Published
2024-10-14
DOI
https://doi.org/10.5753/sbbd_estendido.2024.240552
Citations
3
Primary Topic
Topic Modeling
Type
article
Field-Weighted Citation Impact
1.04
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

Querying Databases with Natural Language: The use of Large Language Models for Text-to-SQL tasks

Marco A. Casanova, Eduardo Nascimento
3 citations
Topic Modeling
1.04
article

Querying Databases with Natural Language: The use of Large Language Models for Text-to-SQL tasks

Marco A. Casanova, Eduardo Nascimento
article en
3 citations

Abstract

The Text-to-SQL task involves generating SQL queries based on a given relational database and a Natural Language (NL) question. Although Large Language Models (LLMs) show good performance on well-known benchmarks, they are evaluated on databases with simpler schemas. This dissertation first evaluates their effectiveness on a complex and openly available database (Mondial) using GPT-3.5 and GPT-4. The results indicate that LLM-based models perform poorly and struggle with schema linking and joins. To improve accuracy, this work proposes the use of LLM-friendly views and data descriptions. A second experiment on a real-world database confirms that this approach enhances the accuracy of the Text-to-SQL task.

Pontifícia Universidade Católica do Rio de Janeiro (BR)
Quality Education
Openalex Percentile: Top 19%
Topic Modeling
1.04
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.