A MATHEMATICAL AND ALGORITHMIC APPROACH TO THE DEVELOPMENT OF AN INTELLIGENT TEXT-TO-SQL SYSTEM BASED ON LARGE LANGUAGE MODELS
DOI:
https://doi.org/10.54309/IJICT.2026.26.2.008Keywords:
Text-to-SQL, большие языковые модели, SQL, интеллектуальная система, математическая модель, алгоритм, RAG, агентные системы, векторный поиск, реляционная база данных.Abstract
The article considers the problem of developing mathematical and algorithmic support for an intelligent Text-to-SQL system designed to automatically convert user queries in natural language into SQL queries for relational databases. The relevance of the study is determined by the growth in the volume of structured data and the need to increase the accessibility of analytical tools for users who do not possess deep knowledge of the SQL language. A formal formulation of the Text-to-SQL problem is proposed as a mapping between a natural-language query, a database schema, the subject-domain context, and the resulting SQL query. The paper examines a mathematical model of a relational schema, a user query, semantic retrieval of relevant context, and a correctness criterion for the generated SQL query. A generalized architecture of an intelligent system is developed, combining large language models, Retrieval-Augmented Generation technology, and an agent-based mechanism for automatic error correction. An algorithm for the system’s operation is presented, including query analysis, extraction of relevant database schema elements, SQL query generation, query execution, verification, and automatic error correction. It is shown that the combination of LLM, RAG, and an agent-based approach can improve the accuracy, adaptability, and practical applicability of Text-to-SQL systems in corporate analytics.
Downloads
Downloads
Published
How to Cite
Issue
Section
License
Copyright (c) 2026 INTERNATIONAL JOURNAL OF INFORMATION AND COMMUNICATION TECHNOLOGIES

This work is licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License.
https://creativecommons.org/licenses/by-nc-nd/3.0/deed.en