Skip to main content
Cornell University
We gratefully acknowledge support from the Simons Foundation, member institutions, and all contributors. Donate
arxiv logo > cs > arXiv:2501.13594

Help | Advanced Search

arXiv logo
Cornell University Logo

quick links

  • Login
  • Help Pages
  • About

Computer Science > Databases

arXiv:2501.13594 (cs)
[Submitted on 23 Jan 2025]

Title:Text-to-SQL based on Large Language Models and Database Keyword Search

Authors:Eduardo R. Nascimento (1 and 3), Caio Viktor S. Avila (1 and 4), Yenier T. Izquierdo (1), Grettel M. García (1), Lucas Feijó L. Andrade (1), Michelle S.P. Facina (2), Melissa Lemos (1 and 3), Marco A. Casanova (1 and 3) ((1) Instituto Tecgraf, PUC-Rio, Rio de Janeiro, Brazil, (2) Petrobras, Rio de Janeiro, Brazil, (3) Departamento de Informática, PUC-Rio, Rio de Janeiro, Brazil, (4) Departamento de Computação, UFC, Fortaleza, Brazil)
View a PDF of the paper titled Text-to-SQL based on Large Language Models and Database Keyword Search, by Eduardo R. Nascimento (1 and 3) and 21 other authors
View PDF HTML (experimental)
Abstract:Text-to-SQL prompt strategies based on Large Language Models (LLMs) achieve remarkable performance on well-known benchmarks. However, when applied to real-world databases, their performance is significantly less than for these benchmarks, especially for Natural Language (NL) questions requiring complex filters and joins to be processed. This paper then proposes a strategy to compile NL questions into SQL queries that incorporates a dynamic few-shot examples strategy and leverages the services provided by a database keyword search (KwS) platform. The paper details how the precision and recall of the schema-linking process are improved with the help of the examples provided and the keyword-matching service that the KwS platform offers. Then, it shows how the KwS platform can be used to synthesize a view that captures the joins required to process an input NL question and thereby simplify the SQL query compilation step. The paper includes experiments with a real-world relational database to assess the performance of the proposed strategy. The experiments suggest that the strategy achieves an accuracy on the real-world relational database that surpasses state-of-the-art approaches. The paper concludes by discussing the results obtained.
Subjects: Databases (cs.DB); Artificial Intelligence (cs.AI)
MSC classes: 68T50
ACM classes: H.2.3; I.2.7
Cite as: arXiv:2501.13594 [cs.DB]
  (or arXiv:2501.13594v1 [cs.DB] for this version)
  https://doi.org/10.48550/arXiv.2501.13594
arXiv-issued DOI via DataCite

Submission history

From: Marco Antonio Casanova [view email]
[v1] Thu, 23 Jan 2025 12:03:29 UTC (1,323 KB)
Full-text links:

Access Paper:

    View a PDF of the paper titled Text-to-SQL based on Large Language Models and Database Keyword Search, by Eduardo R. Nascimento (1 and 3) and 21 other authors
  • View PDF
  • HTML (experimental)
  • TeX Source
  • Other Formats
view license
Current browse context:
cs.DB
< prev   |   next >
new | recent | 2025-01
Change to browse by:
cs
cs.AI

References & Citations

  • NASA ADS
  • Google Scholar
  • Semantic Scholar
a export BibTeX citation Loading...

BibTeX formatted citation

×
Data provided by:

Bookmark

BibSonomy logo Reddit logo

Bibliographic and Citation Tools

Bibliographic Explorer (What is the Explorer?)
Connected Papers (What is Connected Papers?)
Litmaps (What is Litmaps?)
scite Smart Citations (What are Smart Citations?)

Code, Data and Media Associated with this Article

alphaXiv (What is alphaXiv?)
CatalyzeX Code Finder for Papers (What is CatalyzeX?)
DagsHub (What is DagsHub?)
Gotit.pub (What is GotitPub?)
Hugging Face (What is Huggingface?)
Papers with Code (What is Papers with Code?)
ScienceCast (What is ScienceCast?)

Demos

Replicate (What is Replicate?)
Hugging Face Spaces (What is Spaces?)
TXYZ.AI (What is TXYZ.AI?)

Recommenders and Search Tools

Influence Flower (What are Influence Flowers?)
CORE Recommender (What is CORE?)
  • Author
  • Venue
  • Institution
  • Topic

arXivLabs: experimental projects with community collaborators

arXivLabs is a framework that allows collaborators to develop and share new arXiv features directly on our website.

Both individuals and organizations that work with arXivLabs have embraced and accepted our values of openness, community, excellence, and user data privacy. arXiv is committed to these values and only works with partners that adhere to them.

Have an idea for a project that will add value for arXiv's community? Learn more about arXivLabs.

Which authors of this paper are endorsers? | Disable MathJax (What is MathJax?)
  • About
  • Help
  • contact arXivClick here to contact arXiv Contact
  • subscribe to arXiv mailingsClick here to subscribe Subscribe
  • Copyright
  • Privacy Policy
  • Web Accessibility Assistance
  • arXiv Operational Status
    Get status notifications via email or slack