Teaching Model-Driven Low-Code Development Platforms
ACM/IEEE International Conference on Model Driven Engineering Languages and Systems (MODELS), pp. 570–577
Abstract
We present and evaluate a method called grammar masking, which is used to guide large language models (LLMs) toward producing syntactically correct models for a given context-free grammar. Prompt engineering methods such as few-shot learning or priming can be used to improve the chances of an LLM producing correct syntax, but the more complex the grammar, the more time-consuming and less promising these methods become. Previous work is focused primarily on the usage of either language model training or prompt engineering. In this work, a method is presented that restricts the output to a given grammar using constrained decoding to ensure the output adheres to a valid syntax. We use several domain-specific languages (DSLs) built with MontiCore and task multiple LLMs to produce models with and without constrained decoding. A corresponding parser is used to confirm the syntactic correctness of each model. We show that grammar masking can dramatically improve the modeling capabilities of several LLMs, reducing the need for well-refined prompting while increasing the chance of producing correct models.
Authors 4
-
Affiliation as printed
Chair of Software Engineering, RWTH Aachen University, Aachen, Germany
-
Affiliation as printed
Chair of Software Engineering, RWTH Aachen University, Aachen, Germany
-
Affiliation as printed
Chair of Software Engineering, RWTH Aachen University, Aachen, Germany
-
Affiliation as printed
Chair of Software Engineering, RWTH Aachen University, Aachen, Germany
Cited by 2 stored of 2
2 results
Cited by patents worldwide 1 (Lens.org)
-
Total element parameterized model design method based on Excel and low codeCN120337316A 2025-07-18 Active
References 12
-
W4391876619details pending0citations
-
W2159958244details pending0citations
-
W2564750222details pending0citations
-
W3045285896details pending0citations
-
W3195224349details pending0citations
-
W4323033814details pending0citations
-
W4392141840details pending0citations
12 results