Natural Language Query to SQL query generation using LSTMs, Transformers, LLMs and Gen AI
American Journal of Technology · 2025
DOI: 10.58425/ajt.v4i1.352 ↗Kurz gefasst
Fachartikel in der Zeitschrift American Journal of Technology, 2025. Verfasst von Rama Krishna Raju Samantapudi und 2 weiteren Autor:innen. Der Volltext ist frei zugänglich (Open Access, CC BY 4.0).
Abstract (Originalsprache)
Aim
This study examined and assessed how these more sophisticated models, Long Short-Term Memory (LSTM) networks, Transformer architectures, and Large Language Models, can automate SQL query generation from natural language input.
Methods
Benchmark datasets from finance and e-commerce domains were drawn upon and compared to evaluate the models’ ability to respond to different query complexities.
Results
Transformer-based models with self-attention mechanisms outperformed LSTMs in handling long-range dependencies and complicated query structures by degrees, outperforming LSTMs by 87 % compared to 72 % of LSTMs. SQL generation performance was further enhanced by LLMs like GPT-3, which allowed them to produce more humanlike, context-aware query formulation even where inputs were ambiguous or incomplete. They demonstrated a reduction in the need for skilled professionals for database and increased operational efficiency in data-intensive industries.
Conclusion
The study shows the potential of generative AI for database querying systems and the importance of being responsible with its release. Recommendations: Ensuring explainability standards, secure data handling protocols, and regular bias audits must be proactively enforced to address ethical and legal challenges, especially on data privacy, model transparency, and algorithmic bias. These results support the growing trend of applying AI to query systems that are more adaptive, scalable, and usable for nontechnical users in enterprise environments.
Zitieren
APA
Samantapudi, R. K. R., Dhanagari, M. R., & Tarun, S. (2025). Natural Language Query to SQL query generation using LSTMs, Transformers, LLMs and Gen AI. American Journal of Technology. https://doi.org/10.58425/ajt.v4i1.352
Vancouver
Samantapudi RKR, Dhanagari MR, Tarun S. Natural Language Query to SQL query generation using LSTMs, Transformers, LLMs and Gen AI. American Journal of Technology. 2025. doi:10.58425/ajt.v4i1.352
BibTeX
@article{Samantapudi2025,
author = {Samantapudi, Rama Krishna Raju and Dhanagari, Mukesh Reddy and Tarun, Sai},
title = {Natural Language Query to SQL query generation using LSTMs, Transformers, LLMs and Gen AI},
journal = {American Journal of Technology},
year = {2025},
doi = {10.58425/ajt.v4i1.352}
}
EUVIMED