Artificial Intelligence 4 min read

Using AIGC to Generate UML Diagrams: A Practical Exploration

This article explores how large language models like ChatGPT can be leveraged to transform natural‑language requirements into UML diagrams using PlantUML, demonstrating the workflow, prompt engineering, iterative training, and the resulting efficiency gains for developers.

Yum! Tech Team
Yum! Tech Team
Yum! Tech Team
Using AIGC to Generate UML Diagrams: A Practical Exploration

Diagramming is an essential skill for developers, and this article investigates how generative AI (AIGC) can be used to convert textual requirements into UML models efficiently.

Preparation

1. Requirement Example – A scenario describing seat reservation and checkout processes in a board‑game hall management system.

2. Tools

ChatGPT‑3.5: a generative pretrained transformer used for text generation.

PlantUML: a programmable tool that renders UML diagrams from textual code.

Goal

Transform natural‑language requirements into UML diagrams through dialogue with a large model.

Training Phase

Prompt examples are provided to ask the model to produce use‑case diagrams in PlantUML syntax. The generated code is then rendered into visual diagrams (images shown below).

PlantUML rendering results are displayed, and when logical relationships are unsatisfactory, prompts are refined and retried.

Iterative Prompting

Multiple prompts are crafted to improve the model’s understanding of seat reservation logic, resulting in progressively better diagrams.

Results

Final diagrams include use‑case, activity, and sequence diagrams, confirming that the AI‑driven approach meets expectations.

Conclusion

The exploration shows that natural language can be directly transformed into UML models, lowering the barrier for diagram creation, improving efficiency (the whole process took about 3 minutes), and providing clear, logical visualizations, though prompt accuracy and iterative refinement remain critical.

software engineeringChatGPTPlantUMLUMLAIGCAI-driven Modeling
Yum! Tech Team
Written by

Yum! Tech Team

How we support the digital platform of China's largest restaurant group—technology behind hundreds of millions of consumers and over 12,000 stores.

0 followers
Reader feedback

How this landed with the community

login Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.