Large Language Models (LLMs) recently demonstrated capabilities for generating source code in common programming languages. Additionally, commercial products such as ChatGPT 4 started to provide code interpreters, allowing for the automatic execution of generated code fragments, instant feedback, and the possibility to develop and refine in a conversational fashion. With an exploratory research approach, this paper applies code generation and interpretation to conceptual models. The concept and prototype of a conceptual model interpreter is explored, capable of rendering visual models generated in textual syntax by state-of-the-art LLMs such as Llama~2 and ChatGPT 4. In particular, these LLMs can generate textual syntax for the PlantUML and Graphviz modeling software that is automatically rendered within a conversational user interface. The first result is an architecture describing the components necessary to interact with interpreters and LLMs through APIs or locally, providing support for many commercial and open source LLMs and interpreters. Secondly, experimental results for models generated with ChatGPT 4 and Llama 2 are discussed in two cases covering UML and, on an instance level, graphs created from custom data. The results indicate the possibility of modeling iteratively in a conversational fashion.
翻译:大型语言模型(LLMs)近期展现出生成常见编程语言源代码的能力。此外,ChatGPT 4等商业产品已开始提供代码解释器,可自动执行生成的代码片段、提供即时反馈,并支持以对话方式进行开发与完善。本文采用探索性研究方法,将代码生成与解释应用于概念模型。研究探讨了概念模型解释器的概念与原型,该解释器能够渲染由Llama~2和ChatGPT 4等最先进LLM以文本语法生成的可视化模型。具体而言,这些LLM可为PlantUML和Graphviz建模软件生成文本语法,并在对话式用户界面中自动渲染。首要成果是描述通过API或本地方式与解释器和LLM交互所需组件的架构,支持多种商业与开源LLM及解释器。其次,以UML覆盖案例和基于自定义数据生成的实例级图表为例,讨论使用ChatGPT 4和Llama 2生成模型的实验结果。结果表明,以对话方式迭代建模具有可行性。