AUTO-GENERATION OF UML SEQUENCE DIAGRAMS FROM NATURAL LANGUAGE REQUIREMENTS USING GPT-4 MODEL
DOI:
https://doi.org/10.22452/Keywords:
UML Sequence Diagram Generation, Software Requirement Engineering, Software Design, Large Language Model, GPT, Natural Language Processing (NLP)Abstract
Automating the generation of Unified Modelling Language (UML) sequence diagrams from software functional requirements (FRs) can improve productivity. However, existing methods often require user intervention and therefore are not fully automated. To address this gap, this research proposed a novel LLM-based method for automating the generation of UML sequence diagrams from FRs written in English for the web application domain, without requiring human intervention. The proposed method leverages OpenAI’s Generative Pre-Trained Transformer-4 (GPT-4), extracts key information from FRs and constructs corresponding PlantUML statements, which are rendered into UML sequence diagrams. A proof-of-concept prototype implementing the proposed method was developed. The correctness of the artefacts generated by the prototype was evaluated by calculating cosine similarity between them and ground truth (“oracle”) created by third-party experts. An average similarity score of 86.14% across 10 FR sets was obtained, demonstrating a high level of correctness of the generated artefacts. This result shows the potential of LLM, particularly GPT-4 in automatically generating UML sequence diagrams from English FRs.





