The work presented in this thesis illustrates the development of a system based on Generative AI and the Model Context Protocol (MCP) to support Business Intelligence activities starting from natural language queries on a real ERP database. In particular, a host-client-server architecture is designed in which the language model, executed via the Gemini CLI host, acts as an orchestrator, while data access and critical operations are delegated to deterministic tools exposed by an MCP server. The latter is implemented in Python using FastMCP, integrating a Data Access Layer to the database and a pipeline for metadata extraction and serialization, in order to enable schema discovery and guided query generation. In addition, query validation and controlled execution mechanisms are implemented, together with a visualization component in a confined environment to produce graphs from the results. Finally, the solution is evaluated on a test dataset composed of representative use cases, and the overall performance and main critical issues that emerged during the experimentation are discussed.
Il lavoro presentato in questa tesi illustra lo sviluppo di un sistema basato su Generative AI e sul Model Context Protocol (MCP) per supportare attività di Business Intelligence a partire da interrogazioni in linguaggio naturale su un database ERP reale. In particolare, viene progettata un’architettura host-client-server in cui il modello linguistico, eseguito tramite l’host Gemini CLI, svolge il ruolo di orchestratore, mentre l’accesso ai dati e le operazioni critiche sono delegati a tool deterministici esposti da un server MCP. Quest’ultimo viene realizzato in Python tramite FastMCP, integrando un Data Access Layer verso il database e una pipeline per l’estrazione e la serializzazione dei metadati, al fine di abilitare la discovery dello schema e la generazione guidata delle query. Vengono, inoltre, implementati meccanismi di validazione ed esecuzione controllata delle interrogazioni, insieme a una componente di visualizzazione in ambiente confinato per produrre grafici a partire dai risultati. Infine, la soluzione viene valutata su un dataset di test composto da casi d’uso rappresentativi, e vengono discusse le prestazioni complessive e le principali criticità emerse durante la sperimentazione.
Progettazione e implementazione di un sistema basato su Generative AI per effettuare attività di Business Intelligence a partire da interrogazioni in linguaggio naturale
DI SABATINO, WALTER
2024/2025
Abstract
The work presented in this thesis illustrates the development of a system based on Generative AI and the Model Context Protocol (MCP) to support Business Intelligence activities starting from natural language queries on a real ERP database. In particular, a host-client-server architecture is designed in which the language model, executed via the Gemini CLI host, acts as an orchestrator, while data access and critical operations are delegated to deterministic tools exposed by an MCP server. The latter is implemented in Python using FastMCP, integrating a Data Access Layer to the database and a pipeline for metadata extraction and serialization, in order to enable schema discovery and guided query generation. In addition, query validation and controlled execution mechanisms are implemented, together with a visualization component in a confined environment to produce graphs from the results. Finally, the solution is evaluated on a test dataset composed of representative use cases, and the overall performance and main critical issues that emerged during the experimentation are discussed.| File | Dimensione | Formato | |
|---|---|---|---|
|
Tesi - Walter Di Sabatino.pdf
non disponibili
Dimensione
4.15 MB
Formato
Adobe PDF
|
4.15 MB | 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.12075/25513