Abstract
In this work, Dyad, a modeling and simulation language with specialized multi-agent large language model (LLM) workflows, is introduced for Process Systems Engineering (PSE) applications. Dyad is designed to overcome key limitations of general-purpose LLMs, such as context collapse, retrieval failures, and physically inconsistent hallucinations, by decomposing engineering tasks across coordinated agents equipped with domain-specific tools, optimization routines, and access to mechanistic models. Using crystallization as a testbed, we evaluate Dyad against the main general-purpose agentic AI systems (ChatGPT 5.1 and Gemini 3) on three canonical PSE challenges: (i) soft sensing and system monitoring via an ATR-FTIR calibration problem for paracetamol in ethanol–water mixtures; (ii) dynamic modeling of potassium sulfate crystallization and dissolution through population balance models (PBMs) that Dyad iteratively refines, calibrates, and updates when necessary; and (iii) nonlinear model predictive control (NMPC) for batch crystallization, where Dyad proposes control objectives, constraints, and tuning parameters that achieve near set-point tracking with computation times compatible with real-time operation. Across these case studies, Dyad not only proposes state-of-the-art modeling strategies, but also automatically selects model structures, estimates parameters, and suggests refinements that improve extrapolation, particularly near equilibrium conditions, where it recovers physically consistent steady states while alternative PBMs exhibit nonphysical drift. When compared with general-purpose LLMs (ChatGPT and Google Gemini) prompted on the same tasks, Dyad delivers more accurate models, with coefficients of determination exceeding 0.98 for calibration tasks and reductions in mean absolute percentage error from over 100% to below 50% for crystallization dynamics, as well as implementable NMPC formulations with computation times below 7 s per control move. In contrast, other LLMs remain confined to high-level suggestions or approximate parameter guesses and do not produce calibrated models or controllers suitable for real-time operation. These results position specialized multi-agent LLM workflows as practical, trustworthy assistants for accelerating monitoring, modeling, model update, and control in chemical and process industries.
Introduction
The integration of Large Language Models (LLMs) into Process Systems Engineering (PSE) offers significant potential for automating complex modeling tasks. However, general-purpose models like ChatGPT and Google Gemini often fail when faced with rigorous engineering requirements. They are prone to "context collapse"—forgetting critical constraints during extended reasoning—and "hallucinations," where they generate mathematically plausible but physically impossible formulations.
Process models must strictly adhere to first principles, such as mass and energy balances, and reconcile thermodynamic assumptions against experimental data. Because standard LLMs lack native access to mechanistic solvers and optimization algorithms, they cannot reliably generate or debug the dynamic models required for industrial control. This paper introduces Dyad, a specialized modeling language and multi-agent workflow designed to address these gaps by equipping AI agents with domain-specific tools and a protocol-driven investigation framework.
The Dyad Framework
Dyad operates through a structured multi-agent architecture that moves beyond simple text generation. Its core capabilities include:
- Pre-simulation Inspection: Before execution, Dyad analyzes model structures, enumerates unknowns, and classifies states to ensure the mathematical formulation is well-posed.
- Forensic Debugging: If a simulation fails or violates physical laws, Dyad employs backward causal tracing. By checking residuals and sensitivities, it isolates root causes (e.g., incorrect initial conditions) and tests fixes in a persistent Julia REPL environment.
- Tool Integration: Dyad has direct access to numerical solvers via Julia’s ModelingToolkit and optimization algorithms like Nelder-Mead. This allows the system to actively estimate parameters from data rather than relying on approximate guesses.
Experimental Results
Dyad was benchmarked against ChatGPT 5.1 and Gemini 3 across three canonical PSE tasks centered on crystallization processes.
Soft Sensing and Calibration
In an ATR-FTIR calibration task for paracetamol, Dyad proposed a multivariate linear regression model that achieved an $R^2 > 0.98$. Crucially, Dyad demonstrated an understanding of model parsimony; it recognized the risk of overfitting and successfully reduced the feature set from all spectral wavenumbers to the 10 most significant ones without sacrificing accuracy.
Dynamic Modeling and Extrapolation
For the dynamic modeling of potassium sulfate crystallization, Dyad iteratively refined Population Balance Models (PBMs). Starting from a simple model, the agent autonomously suggested and implemented refinements—such as secondary nucleation and size-dependent growth rates—reducing the Mean Absolute Percentage Error (MAPE) from over 100% to below 50%.
A key finding was Dyad’s superior extrapolation capability. While a previously published human-developed model for the same dataset exhibited non-physical drift (e.g., indefinite increases in the zero-order moment), Dyad’s final model correctly predicted a stable physical equilibrium over a 20-hour horizon. This suggests that Dyad’s rigorous constraint checking can prevent overfitting that human experts might overlook.
Real-Time Process Control
Dyad successfully formulated a Nonlinear Model Predictive Controller (NMPC) for batch crystallization. While general-purpose LLMs could only describe NMPC concepts, Dyad formulated the mathematical objectives, set tuning parameters, and deployed a working controller. The generated NMPC computed optimal control actions in under 7 seconds per move, making it fully compatible with the real-time sampling requirements of industrial operations.
Conclusion
The results demonstrate that specialized multi-agent LLM workflows like Dyad can serve as trustworthy assistants in chemical and process industries. By bridging the gap between natural language and mechanistic solvers, Dyad provides a path toward automated, physically consistent modeling and real-time control. Future work will focus on scaling these workflows to plant-wide monitoring and more complex unit operations.
Summary updated