Natural Language Query Systems: Transforming User Queries into Optimized SQL Commands Using LLMs
DOI:
https://doi.org/10.47392/IRJAEH.2026.0030Keywords:
Natural Language Query System, Large Language Models (LLMs), Natural Language Processing (NLP), SQL Query Optimization, Semantic Parsing, Database Schema Mapping, Intelligent Query GenerationAbstract
Natural language interfaces are revolutionizing how users interact with data-intensive systems by eliminating the need for specialized knowledge of query languages such as SQL. This study introduces a Natural Language Query System (NLQS) that utilizes Large Language Models (LLMs) to interpret user-generated natural language inputs and transform them into optimized SQL queries. The system is built on three primary components: natural language understanding, semantic mapping to underlying database schemas, and AI-driven SQL optimization techniques. Unlike conventional query builders, the LLM-based approach effectively resolves ambiguity, interprets contextual meaning, and supports complex multi-condition queries with higher precision. To ensure robustness, the system incorporates a validation layer responsible for detecting errors, refining query structure, and enhancing performance. Experimental analysis shows that the proposed NLQS significantly reduces query formulation time, minimizes manual intervention, and improves database accessibility for non-technical users. Overall, this work demonstrates the capability of LLMs to bridge the gap between human language and structured database operations, leading to more intuitive, efficient, and scalable information retrieval.
Downloads
Downloads
Published
Issue
Section
License
Copyright (c) 2026 International Research Journal on Advanced Engineering Hub (IRJAEH)

This work is licensed under a Creative Commons Attribution-NonCommercial 4.0 International License.
.