A lightweight and explainable conversational AI framework for natural language SQL learning without large language models

Natural language interfaces are increasingly used to support programming education and database interaction. However, many recent Text-to-SQL systems rely heavily on Large Language Models (LLMs), which require substantial computational resources and often operate as opaque black-box models. This paper presents a lightweight conversational AI system that helps beginners learn SQL through interactive, natural language conversations. The proposed chatbot uses natural language to create and execute SQL database queries without using Large Language Models (LLMs). The proposed system is a blend of rule-based dialogue management and machine learning that provides interpretability in natural language to SQL translation. The proposed chatbot was developed using the Rasa framework that employs a Dual Intent and Entity Transformer (DIET) as an intent recognition classifier and a hybrid entity extraction pipeline that merges statistical modeling with regex-based pattern matching. The proposed system facilitates create, read, update, and delete (CRUD) database interactions using natural language and integrates multilayer error management. The proposed system consumes fewer resources in contrast to the LLM-based methods that require powerful computing resources. An experimental test that used more than 500 labeled examples reported that the system has 92.68% intent recognition and 98.30% entity extraction accuracy. Similarly, SQL query generation accuracy was evaluated using 100 natural language queries, and the system achieved 90.0% overall accuracy. These results reveal that lightweight interpretable systems can be as effective or more effective at SQL query generation.

Authors

Institutions

Publication Details

Journal
Scientific Reports
Published
2026-09-12
DOI
https://doi.org/10.1038/s41598-026-70120-5
Primary Topic
Topic Modeling
Type
article
Field-Weighted Citation Impact
0.00
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
article

A lightweight and explainable conversational AI framework for natural language SQL learning without large language models

Kaneeka Vidanage, Dr.Smita Nirkhi, Bahasuru Nayanakantha, Sabyasachi Bhattacharyya
Scientific Reports
Topic Modeling
article

A lightweight and explainable conversational AI framework for natural language SQL learning without large language models

Kaneeka Vidanage, Dr.Smita Nirkhi, Bahasuru Nayanakantha, Sabyasachi Bhattacharyya
article en

Abstract

Natural language interfaces are increasingly used to support programming education and database interaction. However, many recent Text-to-SQL systems rely heavily on Large Language Models (LLMs), which require substantial computational resources and often operate as opaque black-box models. This paper presents a lightweight conversational AI system that helps beginners learn SQL through interactive, natural language conversations. The proposed chatbot uses natural language to create and execute SQL database queries without using Large Language Models (LLMs). The proposed system is a blend of rule-based dialogue management and machine learning that provides interpretability in natural language to SQL translation. The proposed chatbot was developed using the Rasa framework that employs a Dual Intent and Entity Transformer (DIET) as an intent recognition classifier and a hybrid entity extraction pipeline that merges statistical modeling with regex-based pattern matching. The proposed system facilitates create, read, update, and delete (CRUD) database interactions using natural language and integrates multilayer error management. The proposed system consumes fewer resources in contrast to the LLM-based methods that require powerful computing resources. An experimental test that used more than 500 labeled examples reported that the system has 92.68% intent recognition and 98.30% entity extraction accuracy. Similarly, SQL query generation accuracy was evaluated using 100 natural language queries, and the system achieved 90.0% overall accuracy. These results reveal that lightweight interpretable systems can be as effective or more effective at SQL query generation.

Scientific Reports
Indian Institute of Technology Guwahati (IN), General Sir John Kotelawala Defence University (LK), Symbiosis International University (IN)
Quality Education
Openalex Percentile: Top 8%
Topic Modeling
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.