Skip to content
Open access

Large Language Models for UML Class Diagram Modeling: A Preliminary Empirical Evaluation

Jul 2026 · Applied Sciences · 0 citations · 20 references

Abstract

UML class diagram modeling is a fundamental task in software engineering, yet the application of large language models (LLMs) to this domain remains underexplored. Existing studies predominantly focus on single closed-source models with simple prompting strategies, lacking systematic comparisons across model types, prompt engineering techniques, and iterative refinement approaches. In this paper, we construct a difficulty-stratified dataset of 30 UML class diagram exercises and propose an automated weighted evaluation metric over generated PlantUML code—both of which are rarely constructed and systematically applied in existing LLM-driven UML modeling research. We present a preliminary empirical evaluation comparing open-source and closed-source LLMs across multiple scales and types, diverse prompting strategies, and varying requirement complexity levels. Beyond the single-round static paradigm of prior work, we further introduce and evaluate iterative prompting schemes that continuously improve model outputs through structured feedback. Our findings reveal that chain-of-thought prompting has different effects on improving the quality of different models, that relationship modeling is the persistent bottleneck under increasing complexity, and attribute extraction remains a largely unsolved technical challenge across all tested LLMs. Further, automated feedback-driven iterative refinement yields varied improvements: it brings notable performance gains for reasoning-oriented thinking models while delivering only marginal promotion for high-performance general chat models. These results provide actionable guidance for practitioners and researchers applying LLMs to UML modeling tasks.

Read PDF

Similar papers

Review Jul 2026

Large Language Models for Software Engineering Diagrams: A Systematic Review of UML and ER modelling

This survey provides the first systematic synthesis of LLM-based diagram modelling research, highlighting needs for standardised benchmarks, stronger evaluation protocols, broader diagram coverage, and techniques for improving semantic reliability and multi-view consistency.

M. Rahmanian, A. Sami, Yanchao Yu · 0 citations
Preprint Aug 2026

Large Language Models for Requirements Engineering: A Cross-Task Empirical Evaluation

This work presents the first cross-task empirical evaluation of LLMs spanning five RE-related activities, as well as replication materials supporting reproducibility, and a broader understanding of the capabilities, limitations, and practical readiness of current LLMs for RE.

Jacek Dabrowski, Manjeshwar Aniruddh Mallya, Alessio Ferrari et al. · 0 citations
Book Open access Jul 2026

Engineering Practices in Open-Source Agent Frameworks: A Large-Scale Empirical Study

A large-scale empirical study of mainstream open-source agent frameworks from an engineering perspective, providing empirical evidence linking framework design choices to engineering risks and highlighting the need for stronger guidance and support in agent framework development.

Yibo Zhai, Junjun Si, Yan Wang et al. · 0 citations
Open access Aug 2026

Software comprehension in code-centric and model-driven settings: an experimental comparison of models and code

It is demonstrated that models and code achieve comparable overall correctness, and thus models alone may be sufficient in model-centric scenarios where access to code is limited or unavailable, and a consistent structure-behavior comprehension gap is revealed.

Iris Reinhartz-Berger, Monique Snoeck · 0 citations
Open access Aug 2026

Toward generalizable unified modeling language automation: a dual case study on class and use case diagram generation

A dual-LLM pipeline integrating lightweight specification generation with reasoning-oriented code synthesis is presented, establishing a robust foundation for scalable, artificial intelligence-driven automation in software engineering.

Van-Viet Nguyen, Huu-Khanh Nguyen, Kim-Son Nguyen et al. · 0 citations

The Impact of Software Model Slicing on Software Model Completion with Large Language Models

The results show that appropriate model slicing significantly improves completion correctness while simultaneously reducing token usage across several structural and semantic evaluation metrics, and establish model slicing as a key factor in LLM-based model completion and provide guidance for effective context selection for other modeling tasks.

Alisa Welter, Omer Iqbal, Sven Apel · 0 citations