NLP2VIS: Leveraging NLP for automated data visualization and insight generation
Loading...
Date
Journal Title
Journal ISSN
Volume Title
Publisher
St. Francis Institute of Technology
DOI
Abstract
Natural Language Interface to Databases (NLIDB) aims to bridge the gap between complex database queries and users with little or no technical background. In this project, we leverage the T5 (Text-to-Text Transfer Transformer) model to convert natural language queries into accurate SQL statements that extract relevant information from structured educational datasets. The model is trained on over 3,000 English-to-SQL query pairs generated from real and synthetically constructed student databases covering various academic and demographic metrics. The platform also includes a context-aware module, allowing users to ask follow-up questions without re-specifying previous query details, thereby providing a conversational and interactive database querying experience. The second phase of the system focuses on Natural Language Interface to Visualization (NLIV), which takes the interpreted SQL results and maps them to optimal visual formats. By analyzing the structure and intent of user queries, the system suggests and generates suitable chart types such as bar charts, pie charts, and scatter plots. This ensures that the data is not only retrieved accurately but also presented in an intuitive and visually comprehensible manner. The system relies on chart-type prediction coupled with data validation techniques to ensure that the final visual output aligns with the users expectations and the nature of the dataset. The proposed NLP2VIS system achieves 91.59% exact match accuracy, 91.59% execution match accuracy, and 92.92% logical match accuracy in SQL generation, with a 98.56% F1 score in chart type prediction. Compared with existing tools such as Tableau and Power BI, the proposed system enables seamless interaction with educational data without requiring technical expertise, providing a unified pipeline from natural language queries to insightful visualizations. This end-to-end automation makes the platform highly accessible, efficient, and suitable for real-world educational analytics.
Description
Citation
NLP2VIS: Leveraging NLP for automated data visualization and insight generation. BE Project Report, Department of Computer Engineering, St. Francis Institute of Technology, 2024-2025.