Domain-Driven Design (DDD) is a key framework for developing customer-oriented software, focusing on the precise modeling of an application's domain. Traditionally, metamodels that describe these domains are created manually by system designers, forming the basis for iterative software development. This paper explores the partial automation of metamodel generation using generative AI, particularly for producing domain-specific JSON objects. By training a model on real-world DDD project data, we demonstrate that generative AI can produce syntactically correct JSON objects based on simple prompts, offering significant potential for streamlining the design process. To address resource constraints, the AI model was fine-tuned on a consumer-grade GPU using a 4-bit quantized version of Code Llama and Low-Rank Adaptation (LoRA). Despite limited hardware, the model achieved high performance, generating accurate JSON objects with minimal post-processing. This research illustrates the viability of incorporating generative AI into the DDD process, improving efficiency and reducing resource requirements, while also laying the groundwork for further advancements in AI-driven software development.
翻译:领域驱动设计(DDD)是开发面向客户软件的关键框架,其核心在于对应用领域的精确建模。传统上,描述这些领域的元模型由系统设计人员手动创建,并作为迭代软件开发的基础。本文探讨了利用生成式人工智能实现元模型生成的部分自动化,特别是用于生成领域特定的JSON对象。通过在真实DDD项目数据上训练模型,我们证明生成式人工智能能够基于简单提示生成语法正确的JSON对象,为简化设计流程提供了显著潜力。为应对资源限制,该AI模型在消费级GPU上使用4位量化版本的Code Llama及低秩自适应(LoRA)技术进行微调。尽管硬件有限,该模型仍实现了高性能,能以最少的后处理生成准确的JSON对象。本研究阐明了将生成式人工智能融入DDD流程的可行性,既能提升效率、降低资源需求,也为人工智能驱动的软件开发的进一步突破奠定了基础。