NOMAD: A Multi-Agent LLM System for UML Class Diagram Generation from Natural Language Requirements

Polydoros Giannouris, Sophia Ananiadou

TL;DR

NOMAD is a modular, multi-agent LLM framework that decomposes the complex task of generating UML class diagrams from natural language into specialized cognitive subtasks. By mimicking the reasoning process of a human engineer, NOMAD significantly outperforms single-agent baselines, achieving near-perfect class identification and a massive 40% improvement in relationship accuracy.

What Problem Does This Paper Address?

In software engineering, turning messy natural language requirements into formal UML (Unified Modeling Language) diagrams is a critical but error-prone task. If these "blueprints" are wrong, the mistakes become exponentially more expensive to fix later in the development cycle.

Traditional automation relies on rigid, rule-based systems that break when faced with the ambiguity of human speech. While Large Language Models (LLMs) like GPT-4 show promise, treating them as a "single-agent assistant" (one big prompt) often leads to hallucinations, missing relationships, and a lack of interpretability. There is currently a gap in how to build reliable, scalable, and verifiable "language-to-model" workflows.

Methods

The authors introduce NOMAD, a cognitively inspired pipeline that breaks the modeling process into five distinct roles:

  1. Concept Extractor: Identifies domain entities (classes) and their attributes.
  2. Relationship Comprehender: Infers associations, aggregations, and generalizations between those entities.
  3. Model Integrator: Formalizes the findings into a structured JSON object, removing linguistic ambiguity.
  4. Code Articulator: Translates the JSON into syntactically correct PlantUML code.
  5. Validator (Optional): A "reflective" agent that checks the final diagram against the original requirements to suggest corrections.

This modular approach reduces "context interference"—where the model gets confused by trying to do too many things at once—and allows for targeted verification at each step.

Datasets

The study uses a dual-evaluation design:

  • Northwind 2.0: A new, large-scale benchmark (21 classes, 212 elements) reverse-engineered from a Microsoft Access database. This provides a "ground truth" for testing scalability and complex relationships.
  • Supplementary Use Cases: Eight independent, human-authored UML exercises (e.g., "Airline-airport operations," "Video stores") to ensure the system generalizes to realistic, "fuzzy" human descriptions.

Key Insights and Ideas

  • Decomposition is the Key to Relationships: The most striking finding is that while single LLMs are okay at finding "nouns" (classes), they struggle with "verbs" (relationships). By isolating relationship reasoning into its own agent, NOMAD saw its biggest performance gains.
  • The "Garbage In, Garbage Out" Dynamic: LLMs are highly sensitive to requirement quality. NOMAD performed better on the large, well-structured Northwind dataset than on smaller, "fuzzier" human-written exercises, highlighting that reliable modeling depends as much on the input quality as the model architecture.
  • Attributes are the "Final Boss": Even with multi-agent setups, fine-grained attribute extraction remains challenging. Attributes are often implied rather than stated, making them harder for AI to "see" compared to explicit entities.
  • Systematic Error Taxonomy: The paper introduces the first hierarchical taxonomy for LLM-generated UML errors (categorizing them as Missing, Extra, Misrepresented, etc.). This provides a much-needed "lens" for researchers to understand why models fail, rather than just that they failed.

Key Results

  • Superior Accuracy: On the Northwind case study, NOMAD improved the overall F1 score from 0.74 to 0.84 compared to a single-agent GPT-4o baseline.
  • Relationship Mastery: Strict relationship matching jumped from 0.52 to 0.92 on the Northwind dataset.
  • Class Identification: NOMAD achieved a perfect 1.00 F1 score for class detection, suggesting this specific task is largely "solved" by multi-agent LLMs.
  • The Power of Verification: Adding the "Validator" agent improved attribute correctness by over 27% for the DeepSeek V3 model, proving that a "second look" by the AI can catch significant omissions.

Limitations and Future Work

The authors acknowledge that NOMAD’s sequential topology can lead to "communication loss"—if an early agent makes a mistake, it can propagate through the pipeline. The system currently lacks a "feedback loop" where later agents can ask earlier ones for clarification.

Future Directions: * Bidirectional Feedback: Implementing shared memory or iterative loops between agents. * Broader Modeling: Extending the framework to behavioral diagrams (like sequence diagrams) and SysML. * Human-in-the-Loop: Integrating strategies where a human engineer can intervene and guide the agents during the generation process.

Summary updated

Abstract

Large Language Models (LLMs) are increasingly utilised in software engineering, yet their ability to generate structured artefacts such as UML diagrams remains underexplored. In this work we present NOMAD, a cognitively inspired, modular multi-agent framework that decomposes UML generation into a series of role-specialised subtasks. Each agent handles a distinct modelling activity, such as entity extraction, relationship classification, and diagram synthesis, mirroring the goal-directed reasoning processes of an engineer. This decomposition improves interpretability and allows for targeted verification strategies. We evaluate NOMAD through a mixed design: a large case study (Northwind) for in-depth probing and error analysis, and human-authored UML exercises for breadth and realism. NOMAD outperforms all selected baselines, while revealing persistent challenges in fine-grained attribute extraction. Building on these observations, we introduce the first systematic taxonomy of errors in LLM-generated UML diagrams, categorising structural, relationship, and semantic/logical. Finally, we examine verification as a design probe, showing its mixed effects and outlining adaptive strategies as promising directions. Together, these contributions position NOMAD as both an effective framework for UML class diagram generation and a lens onto the broader research challenges of reliable language-to-model workflows.

Empirical ResultsBrowse all benchmarks →

BenchmarkMethodMetricScoreProtocol / Evidence
Eight supplementary use casesBaseAverage F1 score0.6561Breadth evaluation; the table labels this model setting “Small models.”
Source quote
L216: Base │ 0.8185 │ 0.7084 │ 0.4617 │ 0.6358 │ 0.6561
Eight supplementary use casesNOMADAverage F1 score0.6958Breadth evaluation; the table labels this model setting “Small models.”
Source quote
L217: NOMAD │ 0.8573 │ 0.7711 │ 0.4955 │ 0.6592 │ 0.6958
Northwind case studyBaseAttributes F1 score0.5898GPT-4o comparison under direct prompting; attribute extraction.
Source quote
L220: Base │ 0.9545 │ 0.5898 │ 0.5211 │ 0.8777 │ 0.7360
Northwind case studyNOMADAttributes F1 score0.4412GPT-4o comparison using the multi-agent framework; attribute extraction.
Source quote
L221: NOMAD │ 1.0000 │ 0.4412 │ 0.9231 │ 0.9811 │ 0.8360
Northwind case studyNOMADAverage F1 score0.8360GPT-4o backbone; without the verifier agent.
Source quote
L295: NOMAD │ 1.0000 │ 0.4412 │ 0.9231 │ 0.9811 │ 0.8360
BibTeX
@inproceedings{giannouris2026nomad,
  author = {Polydoros Giannouris and Sophia Ananiadou},
  title = {{NOMAD: A Multi-Agent LLM System for UML Class Diagram Generation from Natural Language Requirements}},
  booktitle = {MODELSWARD},
  year = {2026},
  doi = {10.5220/0014301900004058},
}

Loading related content...

Figure