In the current industrial landscape, the ability to rapidly extract meaningful information from large amounts of data has become a key strategic asset. However, data retrieval from relational databases is often hampered by the technical complexity of writing SQL queries, which require specific skills and long execution times. This thesis analyzes the application of Generative Artificial Intelligence to address this critical issue through the Text-to-SQL task. The study focuses on the development of a system based on Large Language Models (LLM) capable of translating natural language requests into executable queries, comparing different architectures and Prompt Engineering strategies. To improve system efficiency and optimize computational costs, a Retrieval-Augmented Generation (RAG) framework and an agent-based approach were implemented. Furthermore, the research included the development of a classification model to automate the choice of output format, distinguishing between textual responses and graphical representations. The results confirm how the integration of advanced AI techniques can simplify access to company data, making information analysis more immediate and intuitive.
Nell’attuale scenario industriale, la capacità di estrarre rapidamente informazioni significative da grandi moli di dati è diventata un asset strategico fondamentale. Tuttavia, il recupero dei dati da database relazionali è spesso rallentato dalla complessità tecnica nella scrittura di query SQL, che richiedono competenze specifiche e tempi di esecuzione elevati. Il presente lavoro di tesi analizza l'applicazione dell'Intelligenza Artificiale Generativa per risolvere questa criticità attraverso il task di Text-to-SQL. Lo studio si focalizza sullo sviluppo di un sistema basato su Large Language Models (LLM) capace di tradurre richieste in linguaggio naturale in query eseguibili, confrontando diverse architetture e strategie di Prompt Engineering. Per migliorare l'efficienza del sistema e ottimizzare i costi computazionali, è stata implementata una struttura basata su Retrieval-Augmented Generation (RAG) e un approccio ad agenti. Inoltre, la ricerca ha previsto lo sviluppo di un modello di classificazione per automatizzare la scelta del formato di output, distinguendo tra risposte testuali e rappresentazioni grafiche. I risultati confermano come l'integrazione di tecniche avanzate di AI possa semplificare l'accesso ai dati aziendali, rendendo l'analisi delle informazioni più immediata e intuitiva.
L’Intelligenza Artificiale Generativa per l’analisi dei dati industriali: implementazione di un sistema Text-to-SQL.
BERTOLINI, MATTEO
2024/2025
Abstract
In the current industrial landscape, the ability to rapidly extract meaningful information from large amounts of data has become a key strategic asset. However, data retrieval from relational databases is often hampered by the technical complexity of writing SQL queries, which require specific skills and long execution times. This thesis analyzes the application of Generative Artificial Intelligence to address this critical issue through the Text-to-SQL task. The study focuses on the development of a system based on Large Language Models (LLM) capable of translating natural language requests into executable queries, comparing different architectures and Prompt Engineering strategies. To improve system efficiency and optimize computational costs, a Retrieval-Augmented Generation (RAG) framework and an agent-based approach were implemented. Furthermore, the research included the development of a classification model to automate the choice of output format, distinguishing between textual responses and graphical representations. The results confirm how the integration of advanced AI techniques can simplify access to company data, making information analysis more immediate and intuitive.| File | Dimensione | Formato | |
|---|---|---|---|
|
BertoliniMatteoPDFA.pdf
embargo fino al 09/04/2027
Dimensione
945.82 kB
Formato
Adobe PDF
|
945.82 kB | Adobe PDF |
I documenti in UNITESI sono protetti da copyright e tutti i diritti sono riservati, salvo diversa indicazione.
https://hdl.handle.net/20.500.14251/5451