Options
An agentic framework for robust and explainable natural language to SQL generation
Date Issued
2025
Publisher
IEEE
ISBN
9798331547899
9798331547905
Citation
Revel, H., Azhar, M., Imtiaz, M. A., Muhammad, Amjad, A., & Dewi, D. A. (2025). An agentic framework for robust and explainable natural language to SQL generation. In IEEE (Ed.). The proceedings of 2025 international conference on emerging research in computational science (ICERCS). 2025 International Conference on Emerging Research in Computational Science (ICERCS), Coimbatore, India (pp. 1-6). IEEE.
Type
Conference Paper
Abstract
The growing volume of structured data across domains poses a major barrier for non-technical users, who are prevented from unlocking its value by the inherent complexity of SQL-based interactions. This model limits access to data and hinders agile, evidence-based decision-making. In this paper, introduce a novel question-and-answer multi-agent system that processes natural-language questions and generates real SQL queries to generate logical explanations or live data displays, thereby aiding users’ understanding of and confidence in search results. The system is typically described as a highly specialized set of agents, with a central ReAct-style SQL agent that performs reasoning and query generation. This base agent is supplemented by an Optimizer Agent for rapid optimization and an Explanation Agent for a parsed explanation of the query intent. We extensively benchmark the framework in a head-to-head comparison of two state-of-the-art LLMs (AIMS, MISTral) on a fine-grained, stratified SQL task benchmark. Experimental results consistently demonstrate that Gemini outperforms Mistral in terms of syntactic fidelity and exact-match precision, particularly for low- to mid-complexity queries. Mistral, on the other hand, exhibits strong semantic robustness, with high execution accuracy even for queries that use syntactically variant but semantically similar SQL. The findings demonstrate the transformative potential of emerging agent architectures to democratize complex and structured datasets by fostering greater data literacy and organizational agility.
Loading...
Availability at HKSYU Library

