Next – Generation Prompt-to-Sql:Automated Generation of Advanced Queries
Next–Generation Prompt-to-Sql: Automated Generation of Advanced Queries
Authors:
A.Kavyasri, A.Akhila, A.Jahnavi, N.Harini, T.Mukesh
Abstract: This paper presents a Next-Generation Prompt-to-SQL system designed to enable users to interact with relational databases using natural language queries. The proposed system integrates a transformer-based language model with schema-aware prompting to accurately translate user input into executable SQL statements. A secure, web-based architecture is developed, incorporating user authentication, a responsive frontend interface, and a FastAPI-based backend connected to a production-grade MySQL database. The system supports essential query operations, including data retrieval, filtering, joins, and nested queries, ensuring practical usability in real-world scenarios. Experimental evaluation demonstrates reliable query generation with low latency and high execution accuracy for basic and moderately complex queries. By reducing the dependency on SQL expertise, the proposed approach enhances accessibility for non-technical users and provides a scalable foundation for future advancements in intelligent database interaction systems.
Keywords: Prompt-to-SQL, Text-to-SQL, Natural Language Processing, Large Language Models, MySQL, FastAPI, Query Automation