Complementing natural language (NL) requirements with graphical models can improve stakeholders' communication and provide directions for system design. However, creating models from requirements involves manual effort. The advent of generative large language models (LLMs), ChatGPT being a notable example, offers promising avenues for automated assistance in model generation. This paper investigates the capability of ChatGPT to generate a specific type of model, i.e., UML sequence diagrams, from NL requirements. We conduct a qualitative study in which we examine the sequence diagrams generated by ChatGPT for 28 requirements documents of various types and from different domains. Observations from the analysis of the generated diagrams have systematically been captured through evaluation logs, and categorized through thematic analysis. Our results indicate that, although the models generally conform to the standard and exhibit a reasonable level of understandability, their completeness and correctness with respect to the specified requirements often present challenges. This issue is particularly pronounced in the presence of requirements smells, such as ambiguity and inconsistency. The insights derived from this study can influence the practical utilization of LLMs in the RE process, and open the door to novel RE-specific prompting strategies targeting effective model generation.
翻译:用图形模型补充自然语言需求可以改善利益相关者之间的沟通,并为系统设计提供方向。然而,从需求创建模型需要人工投入。生成式大语言模型(以ChatGPT为代表)的出现,为模型生成的自动化辅助提供了有前景的途径。本文研究了ChatGPT从自然语言需求生成特定类型模型(即UML序列图)的能力。我们开展了一项定性研究,检查了ChatGPT针对28份不同类型、不同领域的需求文档所生成的序列图。通过对生成图表的分析,观察结果已通过评估日志系统性地记录,并借助主题分析法进行分类。我们的研究结果表明,尽管生成的模型总体上符合标准并展现出合理的可理解性,但其相对于指定需求的完整性和正确性往往存在问题。当需求存在异味(例如模糊性和不一致性)时,这一问题尤为突出。本研究得出的见解可影响大语言模型在需求工程实践中的应用,并为开发针对有效模型生成的新型需求工程专用提示策略开辟道路。