← Latest papers
💻 computer science

From Text to DSL: Evaluating Grammar-Based Model Generation Using Open LLMs

This paper demonstrates that compact, open-source large language models can effectively generate syntactically valid and semantically complete Domain-Specific Language (DSL) models from natural language using few-shot prompting, offering a cost-effective alternative to proprietary models for automating model-driven software engineering tasks.

Original authors: Junaid Baber, Nicolas Hili, Didier Schwab, Léo Challier, Cécilia Satrin

Published 2026-05-18
📖 4 min read☕ Coffee break read

Original authors: Junaid Baber, Nicolas Hili, Didier Schwab, Léo Challier, Cécilia Satrin

Original paper licensed under CC BY 4.0 (http://creativecommons.org/licenses/by/4.0/). This is an AI-generated explanation of the paper below. It is not written or endorsed by the authors. For technical accuracy, refer to the original paper. Read full disclaimer

Imagine you are trying to build a custom house, but instead of hiring a human architect, you ask a robot to draw the blueprints based on your spoken description.

This paper is essentially a report card on how well different "robot architects" (called Large Language Models, or LLMs) can do this job. Specifically, the researchers wanted to see if these robots could follow a very strict, rule-based language (called a DSL) to draw the blueprints for software, rather than just writing messy, free-form text.

Here is the breakdown of their experiment using simple analogies:

The Challenge: The "Strict Grammar" Test

In the world of software, a DSL (Domain Specific Language) is like a very rigid dialect. It's not like normal English where you can say things loosely; it's like a legal contract or a musical score where if you miss a single comma or play the wrong note, the whole thing breaks.

The researchers wanted to know: Can a robot listen to a human say, "I want an ice cream shop website," and instantly draw the perfect, rule-following blueprint without needing to go to school (fine-tuning) first?

The Experiment: The "Taste Test"

The researchers set up a massive taste test involving 39 different robots (AI models).

  • The Big Robots: Some were massive, expensive, and powerful (like a giant supercomputer).
  • The Small Robots: Others were tiny, cheap, and could run on a regular laptop (ranging from very small to medium-sized).

The Rules of the Game:

  1. No Schooling: They didn't teach the robots anything new. They just gave them a "cheat sheet" (a prompt) with examples of how to speak the strict language.
  2. The Task: The robots had to generate two things from scratch:
    • The Data Model: The "ingredients list" (e.g., Ice Cream, Customer, Price).
    • The UI Model: The "store layout" (e.g., where the menu goes, how customers order).
    • Note: In previous studies, the robots were only asked to draw the layout based on a pre-made ingredients list. This time, they had to invent the ingredients list and the layout.

The Process: The "Grammar Police" and the "Human Judge"

After the robots tried to draw their blueprints, the researchers checked them in two ways:

  1. The Grammar Police (Automatic Check): A computer program acted as a strict editor. It scanned the blueprints to see if they followed the exact rules. If a robot forgot a semicolon or used the wrong symbol, the program said, "Fail!" and asked the robot to try again.
  2. The Human Judges (Expert Check): If the blueprint passed the Grammar Police, three human experts (who are like master architects) looked at it. They asked: "Does this actually make sense? Did the robot remember to include a 'Discount' section? Did it connect the 'Customer' to the 'Order' correctly?"

The Results: The "David vs. Goliath" Surprise

The big news is that size didn't matter as much as everyone thought.

  • The Big Robots: As expected, the giant, expensive models did a good job.
  • The Small Robots: Surprisingly, several of the smaller, open-source robots (like gemma3:12b and mistral:7b) performed just as well as the giants. They managed to follow the strict rules and create complete blueprints without needing to be retrained.

Key Findings:

  • Prompting is Key: Just giving the robot a clear set of instructions (the "cheat sheet") was enough to make even small robots work well.
  • Retry Mechanism: If a robot made a small mistake, letting it try again with a slightly different setting helped it fix the error.
  • Cost-Effective: You don't need to rent a supercomputer to build these software blueprints; a smaller, cheaper model can do the job if you guide it correctly.

The Bottom Line

This paper proves that you don't need the most expensive, massive AI to generate complex software designs. Smaller, open-source models can be just as effective if you give them clear instructions and a way to check their work. It's like discovering that a well-trained local carpenter can build a perfect house just as well as a famous architect, as long as you give them the right blueprint and let them double-check their measurements.

What the paper does NOT say:

  • It does not claim these robots are ready to build entire apps for you to download today.
  • It does not say they are perfect for medical or legal advice.
  • It strictly focuses on the ability to generate syntax-correct and semantically complete models for software design, not on deploying them into real-world clinical or business systems yet.

Drowning in papers in your field?

Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.

Try Digest →