Modeling structure and behavior of software systems plays a crucial role in the industrial practice of software engineering. As with other software engineering artifacts, software models are subject to evolution. Supporting modelers in evolving software models with recommendations for model completions is still an open problem, though. In this paper, we explore the potential of large language models for this task. In particular, we propose an approach, retrieval-augmented generation, leveraging large language models, model histories, and retrieval-augmented generation for model completion. Through experiments on three datasets, including an industrial application, one public open-source community dataset, and one controlled collection of simulated model repositories, we evaluate the potential of large language models for model completion with retrieval-augmented generation. We found that large language models are indeed a promising technology for supporting software model evolution (62.30% semantically correct completions on real-world industrial data and up to 86.19% type-correct completions). The general inference capabilities of large language models are particularly useful when dealing with concepts for which there are few, noisy, or no examples at all.
翻译:在软件工程的工业实践中,建模软件系统的结构与行为具有至关重要的作用。与其他软件工程制品类似,软件模型同样面临持续演化的需求。然而,如何通过模型补全推荐来辅助建模者进行软件模型演化,至今仍是一个开放性问题。本文旨在探索大型语言模型在此任务中的应用潜力。具体而言,我们提出了一种基于检索增强生成的方法,该方法融合大型语言模型、模型历史数据及检索增强生成技术来实现模型补全。通过对三个数据集的实验评估——包括一个工业级应用案例、一个公共开源社区数据集以及一个受控的模拟模型仓库集合——我们系统性地考察了基于检索增强生成的大型语言模型在模型补全任务中的潜力。研究发现,大型语言模型确实是支持软件模型演化的有前景的技术(在真实工业数据中实现62.30%语义正确的补全,在类型正确性方面最高可达86.19%)。当处理示例稀缺、存在噪声或完全缺乏示例的概念时,大型语言模型的通用推理能力展现出显著优势。