Skip to content
Review

UML Class Diagram Evaluation and Repair Strategies based on LLMs

Aug 2026 · 0 citations · 40 references
Computer Science

TL;DR

Focusing on typical defects in LLM-generated UML class diagrams, this study reveals that LLMs exhibit uncertainties analogous to human memory, and three targeted repair strategies are proposed, including memory reinforcement, external knowledge injection, and detection-guided automated targeted repair.

Abstract

UML class diagrams are a crucial tool for defining the structure of software systems, but designing accurate and comprehensive class diagrams is a challenging task. Traditionally, creating UML models relies on the expertise and experience of professionals. However, with the development of AI technologies, particularly LLMs, new opportunities for software modeling have emerged. Despite this, there has been limited research on the application of LLMs in software modeling, especially in UML class diagram modeling. This study conducts experiments on several typical software system cases. Combining SDMetrics with expert manual review, this paper comprehensively evaluates the practical performance of mainstream LLMs in UML class diagram modeling from multiple dimensions, including size and completeness, relationship correctness, inheritance hierarchy, and design rule compliance. Focusing on typical defects in LLM-generated UML class diagrams, this study reveals that LLMs exhibit uncertainties analogous to human memory. Accordingly, three targeted repair strategies are proposed, including memory reinforcement, external knowledge injection, and detection-guided automated targeted repair. Experimental results obtained from the case studies indicate that (1) compared to expert-crafted class diagrams, LLM-generated UML class diagrams exhibit several issues, such as incomplete identification of key classes, confusion or omissions in relationships, insufficient or absent inheritance relationships, unused classes, and circular dependencies, and (2) after applying the repair methods, all the LLMs show varying degrees of improvement in addressing these issues. The average repair rate for key class identification reaches 85%, the coupling relationship repair rate is 46%, the inheritance relationship repair rate is 69%, while repair rates for unused classes and circular dependencies both reach 100%.

View source

Similar papers

#software testing Book Open access Oct 2026

On the Use of LLMs to Diagnose and Repair UML/OCL models

Large Language Models (LLMs) can assist developers and modelers in many software engineering activities. In the context of model-driven engineering, diagnosing and fixing errors in software specifications is a challenging task, even for human experts. Errors can be subtle, involving a combination of constraints and mod...

Juan Antonio Gómez-Gutiérrez, R. Clarisó · 0 citations
Open access Sep 2026

Generating UML class diagrams as conceptual models through large language models

The breakthrough of Large Language Models (LLMs) has changed how different kinds of complex tasks are approached, including the ones that require a higher level of abstraction and critical thinking together with advanced domain-specific knowledge, like Conceptual Modeling. Several experiments on testing the modelin...

Marco Calamo, Massimo Mecella, Monique Snoeck · 0 citations
Book Open access Oct 2026

LLMA-UML: Extending the UML for Modeling LLM-Agent Systems

Large Language Model (LLM) agents are becoming important building blocks of software systems. However, an analysis of recent publications shows that existing modeling approaches for LLM-agent systems are fragmented and rarely grounded in widely adopted standards such as the Unified Modeling Language (UML). This fragmen...

Lukas Walter, Kristian Rother, Stefan Henkler · 0 citations
Book Open access Oct 2026

On the Non-Interchangeability of Deterministic and LLM-Based UML Evaluators

Automated assessment of UML class diagrams is essential for scaling software engineering education, with educators adopting both deterministic evaluators and, in recent years, emerging solutions based on Large Language Models. Existing comparisons between the two approaches conflate differences in format and reasoning,...

Giacomo Garaccione, Riccardo Coppola, L. Ardito · 0 citations
Open access Sep 2026

A Unified Intelligent Framework for SysML Use Case Diagram Modeling and Verification

The increasing complexity of systems within Model-Based Systems Engineering (MBSE) environments has made structured and reliable use case modeling critically important. Existing approaches to SysML Use Case Diagram modeling and verification remain fragmented, addressing generation, validation, or reuse in isolation. Th...

Magesh Nachiappan Nachiappan, Shathyanaraynan Balashanmugam, P. de Saqui-Sannes et al. · 0 citations
Conference Aug 2026

Evaluating Template- and Model-Guided LLMs for Requirements Specification

Requirements specification is a pivotal activity in software development. The use of structured templates for specifying requirements can improve their clarity, consistency, and analyzability, which is particularly important in safety-critical domains such as avionics to support verification and certification activitie...

Ikram Darif, Zainab Benlagote, Ghizlane El Boussaidi · 1 citation

We use cookies to run the site and, with your consent, for analytics and to show ads. See our Cookie Policy.