DOI: 10.3390/s26165133 ISSN: 1424-8220

An LLM-Based Framework for the Automatic Generation of SysML Models

Baoran An, Tao Lei, Guangtai Tian

Model-based systems engineering (MBSE) takes Systems Modeling Language (SysML) as the industrial standard modeling language, yet cloud Large Language Model (LLM)-based SysML generation faces limited domain data, model hallucinations, high hardware cost and confidential data leakage risks. This paper builds a 914-sample SysML PlantUML corpus and proposes a fully offline lightweight framework based on Qwen2.5-Coder-7B-Instruct, integrating 4-bit NF4 Quantized Low-Rank Adaptation (QLoRA) fine-tuning, vector-free Jaccard same-diagram reference retrieval and a three-round syntax correction loop. PlantUML executes syntax parsing while Graphviz only renders layouts. Tested on 131 samples covering five structural and behavioral SysML v1 diagram types, the plain-prompt baseline achieves word-set semantic F1 of 52.94%, and the retrieval-enhanced variant lifts the zero-retry syntax pass rate from 92.37% to 99.28%, with F1 slightly dropping to 50.64%. Running fully local without cloud data transmission, this pipeline offers a privacy-safe lightweight solution for SysML PlantUML modeling and does not support SysML-exclusive requirement or parametric diagrams.

More from our Archive