# Metamodel-Guided Model Generation with Layered Constraints

arXiv: https://arxiv.org/abs/2510.25890 · HTML: https://mlsanity.com/paper/2510.25890/

## Key facts

- Cited by 3 papers in the map (data through 14 Oct 2026).
- Builds on 11 of its 34 references that are in the map.
- First posted on arXiv 29 Oct 2025.

## Builds on (most cited first, 11 of 11)

- [Retrieval-Augmented Generation for Knowledge-Intensive NLP Tasks](https://mlsanity.com/paper/2005.11401/) (2020)
- [Efficient Memory Management for Large Language Model Serving with PagedAttention](https://mlsanity.com/paper/2309.06180/) (2023)
- [Self-Refine: Iterative Refinement with Self-Feedback](https://mlsanity.com/paper/2303.17651/) (2023)
- [Grammar-Constrained Decoding for Structured NLP Tasks without Finetuning](https://mlsanity.com/paper/2305.13971/) (2023)
- [Synchromesh: Reliable code generation from pre-trained language models](https://mlsanity.com/paper/2201.11227/) (2022)
- [XGrammar: Flexible and Efficient Structured Generation Engine for Large Language Models](https://mlsanity.com/paper/2411.15100/) (2024)
- [Grammar-Aligned Decoding](https://mlsanity.com/paper/2405.21047/) (2024)
- [On the use of Large Language Models in Model-Driven Engineering](https://mlsanity.com/paper/2410.17370/) (2024)
- [Synergy of Large Language Model and Model Driven Engineering for Automated Development of Centralized Vehicular Systems](https://mlsanity.com/paper/2404.05508/) (2024)
- [PathOCL: Path-Based Prompt Augmentation for OCL Generation with GPT-4](https://mlsanity.com/paper/2405.12450/) (2024)
- [Accurate and Consistent Graph Model Generation from Text with Large Language Models](https://mlsanity.com/paper/2508.00255/) (2025)

## Built on by (most cited first, 3 of 3)

- [PaperJury: Due-Process Review for Bounded LaTeX Revision](https://mlsanity.com/paper/2606.16322/) (2026)
- [Stemming Hallucination in Language Models Using a Licensing Oracle](https://mlsanity.com/paper/2511.06073/) (2025)
- [Harness as an Asset: Enforcing Determinism via the Convergent AI Agent Framework (CAAF)](https://mlsanity.com/paper/2604.17025/) (2026)

## Abstract (arXiv)

Large language models (LLMs) enable natural-language interaction in engineering modeling, but generated models may violate structural constraints, domain rules, or task requirements. We propose a metamodel-guided model generation method that coordinates generation-time constraints and post-generation validation. The method transforms metamodel information, uses its terminology to guide structured constraint extraction from specifications, and links constraints to metamodel elements while recording their sources in an Integrated Constraint Model (ICM). For each task, relevant constraints are bound to concrete objects, values, and references. The generation-time constraint layer (L1) restricts candidate content. The post-generation validation layer (L2) checks constructed models and serialized artifacts, and task acceptance checks retain the original requirements throughout repair. Deterministic procedures construct and serialize models, while LLMs propose candidate content and repairs. Validation uses existing domain tools and checkers written by humans with LLM assistance. Experiments cover AUTOSAR, railway models, and structured decisions in private international law. All 60 AUTOSAR generation runs passed acceptance within the declared task scope, and all 255 resulting ARXML files passed XSD validation. In a separate controlled AUTOSAR repair experiment, all 85 core fault units and 15 prespecified substitute units were restored within one repair round. A local AUTOSAR experiment recorded interventions during stepwise generation. The results support coordinating generation constraints, domain checks, and task acceptance to construct models and guide bounded repair.
