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
- Marco A. Casanova (ORCID: https://orcid.org/0000-0003-0765-9636)
- Eduardo Nascimento (ORCID: https://orcid.org/0009-0005-3391-7813)
Institutions
- Pontifícia Universidade Católica do Rio de Janeiro (BR)
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