In recent years we have witnessed a real revolution in the field of artificial intelligence, with particular attention paid to generative models, where one of the most widespread and well-known examples is ChatGPT. This model has demonstrated its versatility in a wide range of applications, but in this thesis we will focus on how this technology, in this case ChatGPT, can effectively contribute to the automation of the generation and other operations on UML diagrams, essential in design software. This interaction between UML and ChatGPT will take place via PlantUML software, an open-source, pseudo-code-based diagramming tool. The experimentation focuses on ChatGPT's capabilities for generating, manipulating, and translating from one diagram type to another. These analyzes are based on class and sequence diagrams, two very relevant types in the UML landscape, respectively in modeling the static structure of a system and in representing the dynamic interactions between its components. The main objective is to evaluate the effectiveness of the answers with particular attention to their accuracy and the speed in reaching a satisfactory answer. For this purpose, an experimental approach was adopted, based on empirical cases. The analysis of the evaluations aims to provide the most exhaustive answer possible, aimed at understanding how useful the help of artificial intelligence can be. We will highlight the importance of the wording of the prompt: given that it has been noted that the quality of ChatGPT responses increases significantly when the prompt provided is detailed, precise and unambiguous. In addition to highlighting the strengths of the model, the thesis also examines the limitations encountered during the analysis, such as the difficulty of obtaining the same result several times using the same prompt, due to certain structural characteristics of the generative model. This factor demonstrates how even these systems are not perfect, and highlights the random nature of such systems. The results of the analysis show how ChatGPT proves to be a valid ally in software development, even if we will demonstrate how it is better at carrying out certain tasks than others. For example, he is not well able to manipulate the graphic elements of PlantUML, while he is very capable of sketching conceptually correct diagrams. In general, the phases in which he is especially competent are those of designing and visual documentation of the code, as well as translating a diagram into code, making the applications actually usable. In conclusion, this study aims to provide an overall evaluation of the usefulness of ChatGPT in this area, highlighting how the technology can, if used correctly, improve the efficiency and quality of UML-based software design processes.

Negli ultimi anni abbiamo assistito ad una vera rivoluzione nel campo dell'intelli-genza artificiale, con particolare attenzione rivolta ai modelli generativi, dove uno degli esempi più diffusi e conosciuti è ChatGPT. Questo modello ha dimostrato la sua versatilità in un'ampia gamma di applicazioni, ma in questa tesi ci concentreremo su come questa tecnologia, nella fattispecie ChatGPT, possa contribuire in modo efficace all'automazione della generazione e altre operazioni sui diagrammi UML, essenziali nella progettazione software. Questa interazione tra UML e ChatGPT avverrà tramite il software PlantUML, uno strumento open-source per la creazione di diagrammi, basato su pseudo codice. La sperimentazione si concentra sulle capacità di di ChatGPT di generazione, manipolazione e traduzione da un tipo di diagramma all'altro. Queste analisi si basano sui diagrammi di classe e di sequenza, due tipologie molto rilevanti nel panorama UML, rispettivamente nella modellazione della struttura statica di un sistema e nella rappresentazione delle interazioni dinamiche tra i suoi componenti. L'obiettivo principale è quello di valutare l'efficacia delle risposte con particolare attenzione all'accuratezza delle stesse e la rapidità nel giungere a una risposta soddisfacente. Per questo fine è stato adottato un approccio sperimentale, basato su casi empirici. L'analisi delle valutazioni vuole fornire una risposta il più esaustiva possibile, volta a capire quanto può essere utile l'aiuto dell'intelligenza artificiale. Rimarcheremo l'importanza della formulazione del prompt: dato che si è notato che la qualità delle risposte di ChatGPT aumenta in maniera significativa quando il prompt fornito è dettagliato, preciso e privo di ambiguità. Oltre a evidenziare i punti di forza del modello la tesi esamina anche i limiti incontrati durante l'analisi, come la difficoltà di ottenere lo stesso risultato più volte utilizzando lo stesso prompt, a causa di determinate caratteristiche strutturali del modello generativo. Questo fattore dimostra come anche questi sistemi non siano perfetti, e mette in mostra la natura aleatoria dei tali. I risultati dell'analisi mostrano come ChatGPT si dimostra un valido alleato nello sviluppo software, anche se dimostreremo come sia più ferrato nel svolgere determinati compiti rispetto ad altri. Per esempio non è bene in grado di manipolare gli elementi grafici di PlantUML, mentre risulta molto capace nell'abbozzare diagrammi corretti concettualmente. In generale le fasi in cui è specialmente competente sono quelle di ideazione e documentazione visiva del codice, oltre che nel tradurre un diagramma in codice, rendendo le applicazioni di fatto utilizzabili. In conclusione questo studio vuole fornire una valutazione complessiva dell'utilità di ChatGPT in questo ambito, evidenziando come la tecnologia possa, se usata correttamente, migliorare l'efficienza e la qualità dei processi di progettazione software basati su UML.

Generazione automatica di diagrammi UML con ChatGPT: Un'analisi sperimentale tramite PlantUML

GARNERONE, ANDREA
2023/2024

Abstract

Negli ultimi anni abbiamo assistito ad una vera rivoluzione nel campo dell'intelli-genza artificiale, con particolare attenzione rivolta ai modelli generativi, dove uno degli esempi più diffusi e conosciuti è ChatGPT. Questo modello ha dimostrato la sua versatilità in un'ampia gamma di applicazioni, ma in questa tesi ci concentreremo su come questa tecnologia, nella fattispecie ChatGPT, possa contribuire in modo efficace all'automazione della generazione e altre operazioni sui diagrammi UML, essenziali nella progettazione software. Questa interazione tra UML e ChatGPT avverrà tramite il software PlantUML, uno strumento open-source per la creazione di diagrammi, basato su pseudo codice. La sperimentazione si concentra sulle capacità di di ChatGPT di generazione, manipolazione e traduzione da un tipo di diagramma all'altro. Queste analisi si basano sui diagrammi di classe e di sequenza, due tipologie molto rilevanti nel panorama UML, rispettivamente nella modellazione della struttura statica di un sistema e nella rappresentazione delle interazioni dinamiche tra i suoi componenti. L'obiettivo principale è quello di valutare l'efficacia delle risposte con particolare attenzione all'accuratezza delle stesse e la rapidità nel giungere a una risposta soddisfacente. Per questo fine è stato adottato un approccio sperimentale, basato su casi empirici. L'analisi delle valutazioni vuole fornire una risposta il più esaustiva possibile, volta a capire quanto può essere utile l'aiuto dell'intelligenza artificiale. Rimarcheremo l'importanza della formulazione del prompt: dato che si è notato che la qualità delle risposte di ChatGPT aumenta in maniera significativa quando il prompt fornito è dettagliato, preciso e privo di ambiguità. Oltre a evidenziare i punti di forza del modello la tesi esamina anche i limiti incontrati durante l'analisi, come la difficoltà di ottenere lo stesso risultato più volte utilizzando lo stesso prompt, a causa di determinate caratteristiche strutturali del modello generativo. Questo fattore dimostra come anche questi sistemi non siano perfetti, e mette in mostra la natura aleatoria dei tali. I risultati dell'analisi mostrano come ChatGPT si dimostra un valido alleato nello sviluppo software, anche se dimostreremo come sia più ferrato nel svolgere determinati compiti rispetto ad altri. Per esempio non è bene in grado di manipolare gli elementi grafici di PlantUML, mentre risulta molto capace nell'abbozzare diagrammi corretti concettualmente. In generale le fasi in cui è specialmente competente sono quelle di ideazione e documentazione visiva del codice, oltre che nel tradurre un diagramma in codice, rendendo le applicazioni di fatto utilizzabili. In conclusione questo studio vuole fornire una valutazione complessiva dell'utilità di ChatGPT in questo ambito, evidenziando come la tecnologia possa, se usata correttamente, migliorare l'efficienza e la qualità dei processi di progettazione software basati su UML.
Automatic generation of UML diagrams with ChatGPT: An experimental analysis using PlantUML
In recent years we have witnessed a real revolution in the field of artificial intelligence, with particular attention paid to generative models, where one of the most widespread and well-known examples is ChatGPT. This model has demonstrated its versatility in a wide range of applications, but in this thesis we will focus on how this technology, in this case ChatGPT, can effectively contribute to the automation of the generation and other operations on UML diagrams, essential in design software. This interaction between UML and ChatGPT will take place via PlantUML software, an open-source, pseudo-code-based diagramming tool. The experimentation focuses on ChatGPT's capabilities for generating, manipulating, and translating from one diagram type to another. These analyzes are based on class and sequence diagrams, two very relevant types in the UML landscape, respectively in modeling the static structure of a system and in representing the dynamic interactions between its components. The main objective is to evaluate the effectiveness of the answers with particular attention to their accuracy and the speed in reaching a satisfactory answer. For this purpose, an experimental approach was adopted, based on empirical cases. The analysis of the evaluations aims to provide the most exhaustive answer possible, aimed at understanding how useful the help of artificial intelligence can be. We will highlight the importance of the wording of the prompt: given that it has been noted that the quality of ChatGPT responses increases significantly when the prompt provided is detailed, precise and unambiguous. In addition to highlighting the strengths of the model, the thesis also examines the limitations encountered during the analysis, such as the difficulty of obtaining the same result several times using the same prompt, due to certain structural characteristics of the generative model. This factor demonstrates how even these systems are not perfect, and highlights the random nature of such systems. The results of the analysis show how ChatGPT proves to be a valid ally in software development, even if we will demonstrate how it is better at carrying out certain tasks than others. For example, he is not well able to manipulate the graphic elements of PlantUML, while he is very capable of sketching conceptually correct diagrams. In general, the phases in which he is especially competent are those of designing and visual documentation of the code, as well as translating a diagram into code, making the applications actually usable. In conclusion, this study aims to provide an overall evaluation of the usefulness of ChatGPT in this area, highlighting how the technology can, if used correctly, improve the efficiency and quality of UML-based software design processes.
Autorizzo consultazione esterna dell'elaborato
File in questo prodotto:
File Dimensione Formato  
TesiGarneroneAndrea.pdf

non disponibili

Descrizione: Titolo tesi: Generazione automatica di diagrammi UML con ChatGPT: Un’analisi sperimentale tramite PlantUML Autore: Andrea Garnerone
Dimensione 2.34 MB
Formato Adobe PDF
2.34 MB Adobe PDF

I documenti in UNITESI sono protetti da copyright e tutti i diritti sono riservati, salvo diversa indicazione.

Utilizza questo identificativo per citare o creare un link a questo documento: https://hdl.handle.net/20.500.14240/6694