LLM driven Natural Language to SQL for Utility Dashboards

Jyotirmoy Banerji, A. Muh Yakin Amin, Kapil Rathor · 2025

Advancements in Natural Language to Structured Query Language (NL2SQL) systems are improving the accessibility of data stored in relational databases, making it easier for non-technical users to retrieve information using simple language queries. In this paper, we propose an NL2SQL system specifically designed for IoT-driven plant data applications, integrating Large Language Models (LLMs) with a multi-step training and evaluation process. This approach involves developing a context table and accompanying tag datasheet to represent IoT-specific data attributes, fine-tuning a LLM to enhance SQL query generation, and evaluating model performance using the ChatGPT API, comparing generated queries against standard metrics from the Spider dataset. Our methodology aims to address the complexities inherent in NL2SQL tasks involving IoT datasets, where queries are often complex and context specific. This research contributes a scalable and adaptable NL2SQL approach which is suited for IoT data environments.

Read the paper · More papers on PaperTik