
Future work will consider three alternatives for
text-to-SQL, which are not mutually exclusive.
The first alternative will explore a combination of
a question-and-answer interface and database views.
As hinted at the end of Section 5, the view defini-
tions will: (1) create a vocabulary that better matches
user terms; (2) predefine frequently required joins. A
user session will start with a step-by-step NL ques-
tion specification to cope with any mismatch between
the user terms and the view vocabulary, and to disam-
biguate term usage. After this step, the interface will
select a few views to apply a text-to-SQL strategy.
The second alternative will consider fine-tuning a
locally stored LLM specifically for a given database
with a large schema. The training dataset can be quite
laborious to create, but GPT-4 may come in hand to
augment the training set from a seed set of NL ques-
tions and their SQL translations.
Suppose that a reasonable set P of pairs (S
′
,Q
′
),
consisting of an NL question S
′
and its SQL transla-
tion Q
′
, can indeed be generated for a given database
D. A third alternative would be to sample P to con-
struct a set E of pairs (S
′
,Q
′
) such that S and S
′
are
similar, for a given NL question S. Then, a text-
to-SQL strategy would pass E to the LLM to help
translate S, as already used in a limited form in the
LangChain strategies with samples.
ACKNOWLEDGEMENTS
This work was partly funded by FAPERJ un-
der grant E-26/202.818/2017; by CAPES under
grants 88881.310592-2018/01, 88881.134081/2016-
01, and 88882.164913/2010-01; by CNPq under grant
302303/2017-0; and by Petrobras.
REFERENCES
Affolter, K., Stockinger, K., and Bernstein, A. (2019). A
comparative survey of recent natural language inter-
faces for databases. The VLDB Journal, 28:793–819.
Dong, X., Zhang, C., Ge, Y., Mao, Y., Gao, Y., lu Chen, Lin,
J., and Lou, D. (2023). C3: Zero-shot text-to-sql with
chatgpt. arXiv preprint arXiv:2307.07306.
Gao, D., Wang, H., Li, Y., Sun, X., Qian, Y., Ding, B.,
and Zhou, J. (2023). Text-to-sql empowered by large
language models: A benchmark evaluation. arXiv
preprint arXiv:2308.15363.
Garc
´
ıa, G. M., Izquierdo, Y. T., Menendez, E., Dartayre,
F., and Casanova, M. A. (2017). Rdf keyword-based
query technology meets a real-world dataset. In Pro-
ceedings of the International Conference on Extend-
ing Database Technology, pages 656–667. OpenPro-
ceedings.org.
Izquierdo, Y. T., Garcia, G. M., Lemos, M., Novello,
A., Novelli, B., Damasceno, C., Leme, L. A. P. P.,
and Casanova, M. A. (2021). A platform for key-
word search and its application for covid-19 pandemic
data. Journal of Information and Data Management,
12(5):656–667.
Izquierdo, Y. T., Garc
´
ıa, G. M., Menendez, E. S., Casanova,
M. A., Dartayre, F., and Levy, C. H. (2018). Quiow: a
keyword-based query processing tool for rdf datasets
and relational databases. In International Confer-
ence on Database and Expert Systems Applications
(DEXA), pages 259–269. Springer.
Katsogiannis-Meimarakis, G. and Koutrika, G. (2023). A
survey on deep learning approaches for text-to-sql.
The VLDB Journal, 32(4):905–936.
Kim, H., So, B.-H., Han, W.-S., and Lee, H. (2020). Natural
language to sql: Where are we today? Proc. VLDB
Endow., 13(10):1737–1750.
Li, J. et al. (2023). Can llm already serve as a database in-
terface? a big bench for large-scale database grounded
text-to-sqls. arXiv preprint arXiv:2305.03111.
Nascimento, E. R., Garcia, G. M., Victorio, W. Z., Lemos,
M., Izquierdo, Y. T., Garcia, R. L., Leme, L. A. P.,
and Casanova, M. A. (2023). A family of natural lan-
guage interfaces for databases based on chatgpt and
langchain (short paper). In Companion Proceedings
of the 42nd International Conference on Conceptual
Modeling: Posters and Demos co-located with ER
2023, Lisbon, Portugal, November 06-09, 2023, vol-
ume 3618 of CEUR Workshop Proceedings.
Ping, W. J. (2023). Open-sourcing sqleval: our framework
for evaluating llm-generated sql.
Pourreza, M. and Rafiei, D. (2023). Din-sql: Decomposed
in-context learning of text-to-sql with self-correction.
arXiv preprint arXiv:2304.11015.
Wei, J., Wang, X., Schuurmans, D., Bosma, M., Ichter, B.,
Xia, F., Chi, E., Le, Q., and Zhou, D. (2023). Chain-
of-thought prompting elicits reasoning in large lan-
guage models. arXiv preprint arXiv:2201.11903.
Yu, T. et al. (2018). Spider: A large-scale human-labeled
dataset for complex and cross-domain semantic pars-
ing and text-to-sql task. In Proceedings of the 2018
Conference on Empirical Methods in Natural Lan-
guage Processing, pages 3911–3921, Brussels, Bel-
gium.
Yu, X., Cheng, H., Liu, X., Roth, D., and Gao, J. (2023).
Automatic hallucination assessment for aligned large
language models via transferable adversarial attacks.
arXiv preprint arXiv:2310.12516.
Zhong, V., Xiong, C., and Socher, R. (2017). Seq2sql: Gen-
erating structured queries from natural language using
reinforcement learning. CoRR, abs/1709.00103.
ICEIS 2024 - 26th International Conference on Enterprise Information Systems
70