On the Text-to-SQL Task Supported by Database Keyword Search
Eduardo Nascimento, Caio Avila, Caio Avila, Yenier Izquierdo, Grettel García, Lucas Feijó L. Andrade, Michelle S. P. Facina, Melissa Lemos, Marco Casanova, Marco Casanova
2025
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.
DownloadPaper Citation
in Harvard Style
Nascimento E., Avila C., Izquierdo Y., García G., Andrade L., Facina M., Lemos M. and Casanova M. (2025). On the Text-to-SQL Task Supported by Database Keyword Search. In Proceedings of the 27th International Conference on Enterprise Information Systems - Volume 1: ICEIS; ISBN 978-989-758-749-8, SciTePress, pages 173-180. DOI: 10.5220/0013126300003929
in Bibtex Style
@conference{iceis25,
author={Eduardo Nascimento and Caio Avila and Yenier Izquierdo and Grettel García and Lucas Andrade and Michelle Facina and Melissa Lemos and Marco Casanova},
title={On the Text-to-SQL Task Supported by Database Keyword Search},
booktitle={Proceedings of the 27th International Conference on Enterprise Information Systems - Volume 1: ICEIS},
year={2025},
pages={173-180},
publisher={SciTePress},
organization={INSTICC},
doi={10.5220/0013126300003929},
isbn={978-989-758-749-8},
}
in EndNote Style
TY - CONF
JO - Proceedings of the 27th International Conference on Enterprise Information Systems - Volume 1: ICEIS
TI - On the Text-to-SQL Task Supported by Database Keyword Search
SN - 978-989-758-749-8
AU - Nascimento E.
AU - Avila C.
AU - Izquierdo Y.
AU - García G.
AU - Andrade L.
AU - Facina M.
AU - Lemos M.
AU - Casanova M.
PY - 2025
SP - 173
EP - 180
DO - 10.5220/0013126300003929
PB - SciTePress