arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2603.09100cs.SE
收藏

基于大型语言模型的需求生成类模型

Class Model Generation from Requirements using Large Language Models

Monash University(莫纳什大学);University College Dublin(都柏林大学学院)

Jackson Nguyen, Rui En Koe, Fanyu Wang, Chetan Arora, Alessio Ferrari

AI总结:

本文研究了大型语言模型在自动从自然语言需求生成UML类图方面的有效性,通过双验证框架评估模型生成的准确性和一致性。

摘要:

大型语言模型(LLMs)的出现为自动化软件工程活动带来了新的机会,这些活动传统上需要大量的手动工作。其中,类图生成是软件设计中的一个关键但资源密集的阶段。本文研究了最新一代的LLMs,包括GPT-5、Claude Sonnet 4.0、Gemini 2.5 Flash Thinking和Llama-3.1-8B-Instruct,能否自动从自然语言需求生成UML类图。为了评估LLM基于模型生成的有效性和可靠性,我们提出了一种综合的双验证框架,该框架结合了LLM作为判断者的方法与人工在环评估。使用八个异构数据集,我们应用链式思考提示来提取领域实体、属性和关联,生成相应的PlantUML表示。生成的模型在五个质量维度上进行评估:完整性、正确性、符合标准、可理解性和术语一致性。两个独立的LLM判断者(Grok和Mistral)进行结构化的成对比较,其判断进一步通过专家评估验证。我们的结果表明,LLMs能够生成结构上一致且语义上有意义的UML图,与人类评估者有显著的一致性。观察到LLM基于和人类基于评估之间的一致性,突显了LLMs不仅作为建模助手,而且在自动化需求工程工作流中作为可靠评估者的潜力,为LLM驱动的UML类图自动化的能力和限制提供了实用见解。

英文摘要:

The emergence of Large Language Models (LLMs) has opened new opportunities to automate software engineering activities that traditionally require substantial manual effort. Among these, class diagram generation represents a critical yet resource-intensive phase in software design. This paper investigates the capabilities of state-of-the-art LLMs, including GPT-5, Claude Sonnet 4.0, Gemini 2.5 Flash Thinking, and Llama-3.1-8B-Instruct, to generate UML class diagrams from natural language requirements automatically. To evaluate the effectiveness and reliability of LLM-based model generation, we propose a comprehensive dual-validation framework that integrates an LLM-as-a-Judge methodology with human-in-the-loop assessment. Using eight heterogeneous datasets, we apply chain-of-thought prompting to extract domain entities, attributes, and associations, generating corresponding PlantUML representations. The resulting models are evaluated across five quality dimensions: completeness, correctness, conformance to standards, comprehensibility, and terminological alignment. Two independent LLM judges (Grok and Mistral) perform structured pairwise comparisons, and their judgments are further validated against expert evaluations. Our results demonstrate that LLMs can generate structurally coherent and semantically meaningful UML diagrams, achieving substantial alignment with human evaluators. The consistency observed between LLM-based and human-based assessments highlights the potential of LLMs not only as modeling assistants but also as reliable evaluators in automated requirements engineering workflows, offering practical insights into the capabilities and limitations of LLM-driven UML class diagram automation.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑