/

/

Agentic AI for Model-Based Engineering: How Dyad Ensures Correctness Through Constrained, Unit-Checked Modeling

/

/

Agentic AI for Model-Based Engineering: How Dyad Ensures Correctness Through Constrained, Unit-Checked Modeling

Agentic AI for Model-Based Engineering: How Dyad Ensures Correctness Through Constrained, Unit-Checked Modeling

Agentic AI for Model-Based Engineering: How Dyad Ensures Correctness Through Constrained, Unit-Checked Modeling

Date Published

Oct 13, 2025

Oct 13, 2025

Contributors

Share

Share

Date Published

Oct 13, 2025

Contributors

Share

The promise of AI-assisted engineering is tantalizing: what if complex modeling tasks that typically take days could be completed in minutes? But there's a critical challenge that separates hype from reality—correctness. When AI generates code for real-world engineering systems, mistakes aren't just inconvenient; they can be catastrophic.

This is where Dyad's approach to agentic AI fundamentally differs from generic code generation tools. By combining AI agents with a constrained, unit-tested modeling language, Dyad creates a workflow that doesn't just generate code faster—it generates correct code that's ready for real-world deployment.

Watch this tutorial to learn how:

The Problem with Unconstrained AI Code Generation

Traditional AI code assistants can generate impressive-looking code quickly, but they often lack the domain-specific constraints that ensure physical correctness. When you ask a general-purpose AI to "create a thermal model," you might get syntactically correct code that compiles and runs—but does it conserve energy? Are the units consistent? Does it behave physically correctly across different operating regimes?

These aren't edge cases. They're fundamental requirements for any engineering model that will inform real design decisions, safety analyses, or system optimization.

Dyad's Solution: Agentic AI in a Constrained Modeling Environment

Dyad takes a fundamentally different approach by embedding AI agents within a model-based design framework that enforces physical correctness from the ground up. Let's explore how this works through a real example: developing a friction brake system model.

Mathematical Formulation with Physical Reasoning

When you ask Dyad's AI agent to create a friction brake model, the agent doesn't just generate code—it first researches the physics and proposes a mathematical formulation. This creates an opportunity for human review and iteration before any code is written.

In our friction brake example, the engineer can refine the model formulation through simple queries:

  • "Make the friction coefficient temperature-dependent"

  • "Add brake pad wear effects"

  • "Simplify the interface to just take brake pressure as input"

The agent responds with updated formulations and explains the implications: "This change will affect brake performance at high temperatures..." This isn't just code generation—it's collaborative engineering.

Unit Testing: The First Line of Defense

Once the formulation is approved, Dyad implements the model in a language with built-in unit testing. While Dyad currently has the information needed for full unit checking, correctness today is enforced primarily through tests. This means:

  • Forces are forces, not just numbers: If you try to add a torque to a force, the system catches it immediately

  • Automatic dimensional analysis: The AI agent knows that power dissipation must equal force times velocity, and the units must work out

  • No silent unit conversion errors: A classic source of engineering failures (remember the Mars Climate Orbiter?) is eliminated by design

When the AI agent implements the thermal model for the brake system, it's not just writing equations—it’s writing equations where heat_flow has units of Watts, temperature has units of Kelvin, and any mismatch is caught before the code ever runs.

Automatic Validation and Energy Balance Analysis

Here's where Dyad's agentic approach really shines. After implementing the thermal brake model, the agent automatically creates a unit test. But watch what happens next:

The agent runs the test and notices something: the energy doesn't balance. Without any prompting, the agent:

  • Recognizes the physical inconsistency

  • Performs an energy analysis by examining individual terms

  • Reasons that the system hasn't reached steady state

  • Extends the simulation duration

  • Verifies the corrected behavior

This is high-level engineering analysis—the kind that typically requires an experienced engineer to catch. The AI agent isn't just executing instructions; it's validating the physics and catching potential errors before they become problems.

Component Reusability with Guaranteed Interfaces

In model-based engineering, reusability is crucial. The friction brake model, thermal model, and vehicle model need to connect together seamlessly. Dyad's constrained modeling environment ensures:

  • Interface compatibility: Connectors have physical types (mechanical rotational, thermal, etc.) that must match.

  • Automatic connection validation: You can't accidentally connect a hydraulic port to an electrical port.

  • Parameterized components: Models include sensible default parameters but can be easily reconfigured.

When the AI agent creates these models, it's working within a framework that makes incorrect connections impossible.

Conservation Laws Are Automatically Applied for Physical Connections

While Dyad ensures that conservation conservation laws are automatically applied for physical connections, it doesn’t enforce this at the component level. Furthermore, most models actually side step true conservation as part of "engineering judgement".  For example, our tutorials for building RLC circuits do not conserve energy because they ignore the thermal losses.  This is fine if the components themselves are sufficiently insensitive to temperature.  But that is an engineering judgement. 

Real-World Example: Automated Calibration

One of the most impressive demonstrations of agentic AI in Dyad is the automated calibration workflow. The engineer gives a high-level query:
"Run a coast-down test and calibrate the drag coefficients to match a typical passenger vehicle."

The agent then:

  • Researches what a coast-down test is and how it's used for calibration

  • Implements the test procedure in Dyad

  • Iterates through different parameter values

  • Evaluates results against typical vehicle behavior

  • Updates the model with calibrated values

  • Documents the process with plots and summaries

This workflow might take an experienced engineer hours of work—running simulations, tweaking parameters, validating results. The AI agent completes it in minutes, and because it's working within Dyad's constrained environment, the results are physically sound.

From Minutes to Deployment: The Correctness Guarantee

The combination of these features creates something unique: AI-generated models that are correct by construction.

  • Unit testing prevents dimensional errors 

  • Physical component types prevent connection errors

  • Connector-level conservation laws enforce physical consistency

  • Automated testing verifies boundary condition behavior

  • Agent-driven analysis identifies and corrects anomalies

This isn't just about speed—though completing in minutes what used to take days is impressive. It's about confidence. When Dyad's AI agent generates a model, engineers can trust it enough to use it for real design decisions, safety analyses, and system optimization.

The Graphical Layer: Executable Documentation

Dyad goes one step further by making these models graphically editable. The AI agent can:

  • Generate icons for components

  • Auto-layout complete system diagrams

  • Create live, interactive models that can be modified graphically

This means the AI-generated models aren't just correct—they're also maintainable and accessible to the broader engineering team, not just the specialists who understand the underlying equations.

The Future of Engineering: AI as Collaborative Partner

Dyad represents a fundamental shift in how engineers interact with AI. Instead of an AI that generates code you need to carefully review and debug, you have an AI partner that:

  • Understands physics and engineering principles

  • Works within constraints that enforce correctness

  • Validates physical behavior and catches errors

  • Generates tested, documented models

  • Produces reusable components ready for deployment

This is the future of engineering: not replacing engineers with AI, but amplifying their capabilities with AI that understands the domain, respects physical laws, and ensures correctness from the ground up.

Reach Out to Us

The friction brake system demonstration shows what's possible when AI agents work within a properly constrained modeling environment. Tasks that used to require deep expertise and significant time investment can now be accomplished through natural language queries—without sacrificing the correctness required for real-world deployment.

To find out more about using the Agentic AI workflow yourself, reach out to us at sales@juliahub.com 

About Dyad

Dyad is a product by JuliaHub, designed to bring the power of the Julia programming language and AI-assisted workflows to model-based systems engineering. Dyad brings together cloud-native infrastructure, differentiable programming, and modular extensibility to support next-generation engineering workflows. It enables the development of continuously improving digital models by integrating AI with Scientific Machine Learning (SciML) in a safe, engineer-in-the-loop, environment.

Tags

Tags

Tags

Authors

Dr. Chris Rackauckas is the VP of Modeling and Simulation at JuliaHub, the Director of Scientific Research at Pumas-AI, Co-PI of the Julia Lab at MIT, and the lead developer of the SciML Open Source Software Organization. He is the lead developer of the Pumas project and has received a top presentation award at every ACoP in the last 3 years for improving methods for uncertainty quantification, automated GPU acceleration of nonlinear mixed effects modeling (NLME), and machine learning assisted construction of NLME models with DeepNLME. For these achievements, Chris received the Emerging Scientist award from ISoP.

Authors

Dr. Chris Rackauckas is the VP of Modeling and Simulation at JuliaHub, the Director of Scientific Research at Pumas-AI, Co-PI of the Julia Lab at MIT, and the lead developer of the SciML Open Source Software Organization. He is the lead developer of the Pumas project and has received a top presentation award at every ACoP in the last 3 years for improving methods for uncertainty quantification, automated GPU acceleration of nonlinear mixed effects modeling (NLME), and machine learning assisted construction of NLME models with DeepNLME. For these achievements, Chris received the Emerging Scientist award from ISoP.

Authors

Dr. Chris Rackauckas is the VP of Modeling and Simulation at JuliaHub, the Director of Scientific Research at Pumas-AI, Co-PI of the Julia Lab at MIT, and the lead developer of the SciML Open Source Software Organization. He is the lead developer of the Pumas project and has received a top presentation award at every ACoP in the last 3 years for improving methods for uncertainty quantification, automated GPU acceleration of nonlinear mixed effects modeling (NLME), and machine learning assisted construction of NLME models with DeepNLME. For these achievements, Chris received the Emerging Scientist award from ISoP.

Learn about Dyad

Get Dyad Studio – Download and install the IDE to start building hardware like software.

Read the Dyad Documentation – Dive into the language, tools, and workflow.

Join the Dyad Community – Connect with fellow engineers, ask questions, and share ideas.

Learn about Dyad

Get Dyad Studio – Download and install the IDE to start building hardware like software.

Read the Dyad Documentation – Dive into the language, tools, and workflow.

Join the Dyad Community – Connect with fellow engineers, ask questions, and share ideas.

Contact Us

Want to get enterprise support, schedule a demo, or learn about how we can help build a custom solution? We are here to help.

Contact Us

Want to get enterprise support, schedule a demo, or learn about how we can help build a custom solution? We are here to help.