From Use Cases to Sequence Diagrams: Schema-Constrained Generation with Large Language Models
Sequence diagrams are widely used to model interactions among system components and external actors by explicitly describing how operations are executed over time. However, constructing sequence diagrams manually is tedious and time-consuming in practice, and their automated generation remains largely unresolved.
In this work, we study LLM-based sequence diagram generation from use cases and make three contributions: (1) We construct a high-quality dataset of industrial-level use cases paired with corresponding sequence diagrams, designed to support reproducible and extensible future research. (2) We investigate structured generation with schema constraint in workflow and chain-of-thought (CoT) manners, producing complex sequence diagrams with nested combined fragments. (3) We propose an evaluation framework that measures not only sequential message correctness but also the structural validity of nested control structures. Experimental results demonstrate that incorporating schema constraint and CoT/workflow guidance substantially improves generation quality over a basic LLM-only approach. Using GPT-5.1, the CoT method achieves perfect participant identification (F1 = 1.0 vs. 0.719), improves message extraction accuracy (F1 = 0.852 vs. 0.585), eliminates compilation errors (0% vs. 26.9%), and shows improved handling of jump scenarios.
Thu 20 AugDisplayed time zone: Eastern Time (US & Canada) change
11:00 - 12:30 | Requirements/Goal Modeling & LLMResearch Papers / RE@Next! Papers / Industrial Innovation Papers at A-1302 Chair(s): Alicia M. Grubb Smith College | ||
11:00 30mTalk | From Use Cases to Sequence Diagrams: Schema-Constrained Generation with Large Language Models Research Papers Chunhao Huang Nanjing University, Yuan Yao Nanjing University, Taolue Chen Birkbeck, University of London, Xiaoxing Ma Nanjing University | ||
11:30 30mTalk | Dynamic Goal Modelling for Context-Aware IoT Systems RE@Next! Papers Mirza Rehenuma Tabassum Toronto Metropolitan University, Sadaf Mustafiz Toronto Metropolitan University | ||
12:00 30mTalk | A Serious Game for Cross-Functional Alignment in Industrial Goal Modeling Industrial Innovation Papers | ||