Loading article...
Loading article...
Stream/Area:
-
Subject:
-
Paper ID:
IJSREM64775
Volume:
10 |
6 |
Jun 2026
Pages:
1-6
Publication Frequency:
Monthly (12 issues per year)
License:International Journal of Scientific Research in Engineering and Management follows the Creative Commons Attribution 4.0 (CC BY 4.0) License, allowing free use and distribution with proper attribution.
Department of Information Technology
G H Raisoni College of Engineering and Management, Pune
Department of Information Technology
G H Raisoni College of Engineering and Management
Department of Information Technology
G H Raisoni College of Engineering and Management, Pune
Department of Information Technology
G H Raisoni College of Engineering and Management
Modern organizations rely on relational databases for business intelligence, yet non-technical users are excluded because they cannot write SQL. This paper presents Business Analytics through Schema-Aware Query Validation, a natural language querying system that enables business users to interact with enterprise databases in plain English through a web-based chat interface. The core of the system is a self-reflective Retrieval-Augmented Generation (Self-RAG) pipeline that (i) adaptively retrieves relevant schema context from a vector database using a quality-driven expansion strategy, (ii) generates candidate SQL via a large language model, and (iii) iteratively refines the query using three SQL-specific reflection tokens-ISVALID, ISALIGNED, and ISCORRECT-that assess syntax correctness, schema compliance, and semantic accuracy, respectively. A business context validation layer cross-checks each generated query against the live database schema before execution, ensuring alignment with organizational semantics. A hybrid chart-selector module maps query results to the most suitable visualization type using rule-based heuristics with an LLM fallback for ambiguous result schemas. Evaluation on a 150-query business analytics benchmark demonstrates that Business Analytics through Schema-Aware Query Validation achieves 76.4% execution accuracy, a valid SQL rate of 98.9%, and reduces schema-error queries by 61% compared to a zero-shot LLM baseline, while maintaining an average end-to-end latency of 3.4 s. The hybrid chart selector achieves 89.3% visualization recommendation accuracy.
KEYWORDS
This paper presented Business Analytics through Schema-Aware Query Validation, a self-reflective, schema-aware natural language querying system for business analytics. By combining adaptive schema-chunk retrieval, iterative SQL refinement via three reflection tokens (ISVALID, ISALIGNED, ISCORRECT), and a business context validation gate, the proposed system enables non-technical users to query enterprise databases in plain English with high reliability. Evaluation on a 150-query business benchmark shows 76.4% execution accuracy and a 98.9% valid SQL rate, with the schema validation layer reducing schema-error queries by 61% over a zero-shot baseline. The hybrid chart selector achieves 89.3% visualization recom-mendation accuracy, with the LLM fallback stage contributing most significantly for ambiguous multi-measure result schemas. The primary limitations of the current system are • Latency: High latency on extra hard queries (avg. 5.1 s), which arises from multiple LLM calls within the reflection loop. • Evaluation Context: Evaluation on synthetic rather than real enterprise data, which may not capture the full complexity of production schemas. • Benchmark Gaps: Absence of direct comparison with published Text-to-SQL systems on the Spider benchmark. Future work will explore three directions. First, caching partial query plans across sessions to reduce latency for repeated or similar queries. Second, extending schema retrieval to databases with 500+ tables by introducing hierarchical retrieval strategies. Third, evaluating the proposed system on the Spider benchmark [10] to enable direct comparison with DIN-SQL [9], ReFoRCE [7], and SHARE [8], and incorporating user feedback signals to fine-tune reflection token thresholds over time.
[1] A. Alparslan, “The role of accuracy and validation effectiveness in conversational business analytics,” IEEE Access, vol. 13, pp. 29279–29291, 2025. [2] S. Chu and J. Liu, “Based on BERT-GPT-GNN converged architecture: intelligent generation engine for complex SQL queries in business intelligence,” Discov. Artif. Intell., Springer, 2025. [3] P. Lewis, E. Perez, A. Piktus, F. Petroni, V. Karpukhin, N. Goyal,A. Küttler, M. Lewis, W. Yih, T. Rocktäschel, S. Riedel, and D. Kiela, “Retrieval-augmented generation for knowledge-intensive NLP tasks,” in Adv. Neural Inf. Process. Syst., vol. 33, pp. 9459–9474, 2020. [4] K. Hu, M. A. Bakker, S. Li, T. Kraska, and C. Hidalgo, “VizML: A machine learning approach to visualization recommendation,” in Proc. CHI Conf. Human Factors Comput. Syst., pp. 1–12, 2019. [5] A. Asai, Z. Wu, Y. Wang, A. Sil, and H. Hajishirzi, “Self-RAG: Learning to retrieve, generate, and critique through self-reflection,” in Proc. Int. Conf. Learn. Representations (ICLR), 2024. [6] R. I. Saveliev and M. V. Dendiuk, “Self-reflective retrieval-augmented generation (Self-RAG) in analytical systems,” in Proc. Int. Sci.-Prac. Conf. Forestry Educ. Sci., 2024. [7] M. Deng, A. Ramachandran, C. Xu, L. Hu, Z. Yao, A. Datta, and H. Zhang, “ReFoRCE: A Text-to-SQL agent with self-refinement, consensus enforcement, and column exploration,” in ICLR Workshop VerifAI, 2025. [8] G. Qu, J. Li, B. Qin, X. Li, N. Huo, C. Ma, and R. Cheng, “SHARE: An SLM-based hierarchical action correction assistant for Text-to-SQL,” in Proc. Annu. Meeting Assoc. Comput. Linguistics (ACL), 2025. [9] M. Pourreza and D. Rafiei, “DIN-SQL: Decomposed in-context learning of text-to-SQL with self-correction,” in Adv. Neural Inf. Process. Syst., vol. 37, 2024. [10] 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,” in Proc. Conf. Empirical Methods Natural Lang. Process. (EMNLP), pp. 3911–3921, 2018.
Publication Date
6/10/2026
Peer Review Type
Double-Blind Peer Review
Review Rounds: 2
Documents
Article Views
0
Total views since publication
PDF Downloads
8
Total downloads since publication
Geographic Reach
5
Digital Preservation: This article is permanently archived on Zenodo and complies with all data preservation standards across major indexing platforms.
Plagiarism Screening
This manuscript has been checked for plagiarism using TurnitinPlagiarismChecker software.
Conflict of Interest
The authors declare no conflict of interest related to this research work.
Funding Information
No funding information available for this research.
Related research in the same subject area
Loading similar articles...