Table of Contents
Fetching ...

Leveraging Generative AI for Enhancing Domain-Driven Software Design

Götz-Henrik Wiegand, Filip Stepniak, Patrick Baier

TL;DR

This work investigates partially automating domain-driven design metamodel generation by training an open-weight generative model on real-world DDD JSON data to produce syntactically valid domain objects. Using Code Llama 7B with 4-bit quantization and LoRA, trained on consumer-grade hardware, the study demonstrates high syntactic correctness and competitive BLEU scores with minimal post-processing, while managing privacy constraints. A rigorous, multi-phase evaluation—including hyperparameter tuning, final training on limited hardware, and parsing-based model assessment—reveals both the potential and limitations of AI-assisted DM generation for DDD, including parsing challenges at token limits and biases from the data. The results suggest a viable path toward integrating AI into DDD tooling, enabling more efficient, machine-readable metamodel creation and serving as a foundation for broader AI-driven software development support, with code available for replication and extension.

Abstract

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.

Leveraging Generative AI for Enhancing Domain-Driven Software Design

TL;DR

This work investigates partially automating domain-driven design metamodel generation by training an open-weight generative model on real-world DDD JSON data to produce syntactically valid domain objects. Using Code Llama 7B with 4-bit quantization and LoRA, trained on consumer-grade hardware, the study demonstrates high syntactic correctness and competitive BLEU scores with minimal post-processing, while managing privacy constraints. A rigorous, multi-phase evaluation—including hyperparameter tuning, final training on limited hardware, and parsing-based model assessment—reveals both the potential and limitations of AI-assisted DM generation for DDD, including parsing challenges at token limits and biases from the data. The results suggest a viable path toward integrating AI into DDD tooling, enabling more efficient, machine-readable metamodel creation and serving as a foundation for broader AI-driven software development support, with code available for replication and extension.

Abstract

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.
Paper Structure (15 sections, 1 equation, 4 figures, 4 tables)

This paper contains 15 sections, 1 equation, 4 figures, 4 tables.

Figures (4)

  • Figure 1: Abstracted visualization of the various steps of data pre-processing with data cleaning, chunking and splitting to the various data sets for training.
  • Figure 2: Parameter importance for multiple evaluation metrics (Objectives) with importance calculated using permutation importance with Random Forest RegressorlouppeUnderstandingRandomForests2015.
  • Figure 3: Weighted sum in reference to inverse Loss $\widetilde{L}(x)$ and BLEU $B(x)$.
  • Figure 4: The development of the Training Loss (blue) and Evaluation Loss (red) are plotted over the training steps of the final training, with an update every 50 steps.