AI
LLMs Can Now Generate Realistic Test Data from Software Models
Researchers introduce LIMoGen, a system that uses large language models to automatically create diverse and realistic sample data from UML class diagrams for testing and training.
When software engineers need concrete examples to test their designs or teach modeling concepts, they typically have to hand-craft sample data that actually makes sense. A new research paper demonstrates how large language models can automate this tedious task while maintaining both accuracy and realism.
The Problem with Current Approaches#
Existing tools for generating test data from software models focus narrowly on structural correctness—making sure instances follow the rules of the model. However, they frequently miss the mark on two equally important qualities: diversity (generating varied types of data) and realism (ensuring the data makes sense in the real world). This gap leaves practitioners with output that technically satisfies the schema but reads as nonsensical or unhelpful for practical applications like model-based testing, educational demonstrations, or machine learning training sets.
Introducing LIMoGen#
Researchers have developed LIMoGen (LLM-based Instance Model Generation), a system that transforms UML class diagrams into realistic UML object diagrams—essentially generating example objects that instantiate a software model. The approach combines large language models with automated feedback loops: when an LLM-generated instance violates the model's constraints, the system uses the USE model validation tool to identify problems and repair them, steering the generation toward conformity.
The team tested two distinct generation strategies:
- A single instruction-based prompt that provides direct guidance on what to generate
- A Chain-of-Thought approach that deliberately targets unusual scenarios (boundary cases, edge cases, and over-constrained situations)
Validation and Results#
Evaluation across ten domain models revealed that all generated instances were structurally sound and conformed to their models. The data demonstrated meaningful diversity in both values and structure. When assessing realism—a notoriously subjective criterion—the researchers employed domain-specific validation checks and invited an LLM to serve as a judge, with human experts auditing the results. Most realism issues centered on inconsistencies between field values (for example, a customer's billing address mismatching their region). The LLM-as-judge approach detected these problems reliably, confirmed by human review.

