NATURAL LANGUAGE DATABASE QUERY AND ANALYTICS AGENT | IJCSE Volume 10 – Issue 5 | IJCSE-V10I5P42

IJCSE
International Journal of Computer Science Engineering Techniques
ISSN 2455-135X Β· Peer-Reviewed Β· Open Access
πŸ“š Volume 10, Issue 5
πŸ“… October 16, 2026
πŸ“„ Pages 348–353
πŸ”– ID: IJCSE-V10I5P42

NATURAL LANGUAGE DATABASE QUERY AND ANALYTICS AGENT

Author(s)

Prajwal G K, Mrs. Bhavya B V, Veeresh, Sambram S, Sai Mohan S M

Abstract

Colleges record semester results in spreadsheets, and answering even a simple question about them, such as how one section performed compared with another, usually means filtering and calculating by hand or writing SQL. This paper presents the Natural Language Database Query and Analytics Agent, a system that lets non-technical users ask such questions in plain English. The agent supplies the schema of a relational database to a large language model, which writes a SQL query. The query is checked, executed in read-only mode, corrected using the database error message if it fails, and the result is returned as text, a table or a chart. The design is applied to the Information Science and Engineering result sheets of 206 students over three semesters (IV, V and VI). Example questions are run against the prepared database, and their answers are reported as ground truth for future testing, along with data-quality problems found in the source sheets. The measured accuracy of the model-generated queries is left for future work.

Keywords

Natural Language Interface, Text-to-SQL, Large Language Model, LLM Agent, Database Query, Data Analytics, Educational Data, Result Analysis.

Conclusion

This paper described a Natural Language Database Query and Analytics Agent for semester result data. It supplies the database schema to an LLM, validates the generated SQL, runs it in read-only mode, corrects itself when errors occur, and presents answers as text, tables or charts together with the executed SQL. The design builds on existing text-to-SQL and agent research and applies it to the practical needs of a college department. Applied to the result sheets of three semesters, the preparation step produced a database of 612 semester results and 5,508 subject marks, on which a set of example questions was answered. Several data inconsistencies were found in the process. The accuracy of the language model in generating these queries has not yet been measured. Future work will therefore build a larger question set with ground-truth queries, compare different LLMs including smaller locally hosted ones, let the agent ask clarifying questions for ambiguous requests, add role-based access to student-level data, and test the tool with faculty. The system is intended to help staff explore result data, not to replace official result processing, and answers should be checked against the source records whenever decisions depend on them.

References

[1] T. Yu, R. Zhang, K. Yang, M. Yasunaga, D. Wang, Z. Li, J. Ma, I. Li, Q. Yao, S. Roman, Z. Zhang, and D. Radev, β€œSpider: A large-scale human-labeled dataset for complex and cross-domain semantic parsing and text-to-SQL task,” in Proc. Conf. Empirical Methods in Natural Language Processing (EMNLP), Brussels, Belgium, 2018, pp. 3911–3921.
[2] J. Li et al., β€œCan LLM already serve as a database interface? A BIg bench for large-scale database grounded text-to-SQLs,” in Advances in Neural Information Processing Systems (NeurIPS), 2023.
[3] M. Pourreza and D. Rafiei, β€œDIN-SQL: Decomposed in-context learning of text-to-SQL with self-correction,” in Advances in Neural Information Processing Systems (NeurIPS), 2023.
[4] D. Gao, H. Wang, Y. Li, X. Sun, Y. Qian, B. Ding, and J. Zhou, β€œText-to-SQL empowered by large language models: A benchmark evaluation,” Proc. VLDB Endowment, vol. 17, no. 5, 2024.
[5] X. Chen, M. Lin, N. SchΓ€rli, and D. Zhou, β€œTeaching large language models to self-debug,” in Proc. Int. Conf. Learning Representations (ICLR), 2024.
[6] S. Yao, J. Zhao, D. Yu, N. Du, I. Shafran, K. Narasimhan, and Y. Cao, β€œReAct: Synergizing reasoning and acting in language models,” in Proc. Int. Conf. Learning Representations (ICLR), 2023.

πŸ“‹ How to Cite This Paper

Prajwal G K, Mrs. Bhavya B V, Veeresh, Sambram S, Sai Mohan S M (2026). NATURAL LANGUAGE DATABASE QUERY AND ANALYTICS AGENT. International Journal of Computer Science Engineering Techniques, 10(5), 348–353. ISSN: 2455-135X. DOI: https://doi.org/10.5281/zenodo.23422249
Β© 2026 International Journal of Computer Science Engineering Techniques (IJCSE). All rights reserved. Β· ijcsejournal.org
Submit Your Paper