Text2Model: Generating dynamic chemical reactor models using large language models (LLMs)

As large language models have shown remarkable capabilities in conversing via natural language, the question arises in which way LLMs could potentially assist chemical engineers in research and industry with domain-specific tasks. We generate dynamic chemical reactor models in Modelica code format from textual descriptions as user input. We fine-tune Llama 3.1 8B Instruct on synthetically generated Modelica code for different reactor scenarios. We compare the performance of our fine-tuned model to the baseline Llama 3.1 8B Instruct model as well as GPT4o. We manually assess the models' predictions regarding the syntactic and semantic accuracy of the generated dynamic models. We find that considerable improvements are achieved by the fine-tuned model with respect to both the semantic and the syntactic accuracy of the Modelica models. However, the fine-tuned model lacks a satisfactory ability to generalize to unseen scenarios compared to GPT4o.

Authors

Institutions

Publication Details

Journal
Systems and Control Transactions
Published
2025-06-30
DOI
https://doi.org/10.69997/sct.165009
Citations
3
Primary Topic
Topic Modeling
Type
article
Field-Weighted Citation Impact
7.44
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

Text2Model: Generating dynamic chemical reactor models using large language models (LLMs)

Sebastian Rupprecht, Artur M. Schweidtmann, Giacomo Lastrucci, Manish Kumar et al.
3 citations
Systems and Control Transactions
Topic Modeling
7.44
article

Text2Model: Generating dynamic chemical reactor models using large language models (LLMs)

Sebastian Rupprecht, Artur M. Schweidtmann, Giacomo Lastrucci, Manish Kumar, Yassine Hounat
article en
3 citations

Abstract

As large language models have shown remarkable capabilities in conversing via natural language, the question arises in which way LLMs could potentially assist chemical engineers in research and industry with domain-specific tasks. We generate dynamic chemical reactor models in Modelica code format from textual descriptions as user input. We fine-tune Llama 3.1 8B Instruct on synthetically generated Modelica code for different reactor scenarios. We compare the performance of our fine-tuned model to the baseline Llama 3.1 8B Instruct model as well as GPT4o. We manually assess the models' predictions regarding the syntactic and semantic accuracy of the generated dynamic models. We find that considerable improvements are achieved by the fine-tuned model with respect to both the semantic and the syntactic accuracy of the Modelica models. However, the fine-tuned model lacks a satisfactory ability to generalize to unseen scenarios compared to GPT4o.

Systems and Control TransactionsVol. 4
Delft University of Technology (NL)
Openalex Percentile: Top 3%
Topic Modeling
7.44
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.