Modular LLMs for Process Engineering

  • Thon, Christoph (Technische Universität Braunschweig)
  • Xu, Tianyu (Technische Universität Braunschweig)
  • Schilde, Carsten (Technische Universität Braunschweig)

Please login to view abstract download link

Domain experts in process engineering increasingly expect AI assistants to answer highly specific technical questions and to support quantitative reasoning. However, general-purpose large language models (LLMs) often lack coverage of niche engineering knowledge and may produce unverifiable statements. We propose a modular, transformer-based framework that improves the reliability of domain-specific question answering and engineering calculations. The framework combines three components. First, we adapt an open-source LLM via parameter-efficient fine-tuning (qLoRA), updating only a small set of additional parameters using question–answer pairs derived from literature and augmented for terminology and unit variants. Secondly, we employ retrieval-augmented generation (RAG). Before answering, the assistant searches a domain document collection and bases the response on the most relevant passages (a semantic search index with structured chunking and optional second-stage re-ranking). Thirdly, a calculation expert generates explicit equations and performs unit checks. This improves stability by producing multiple candidate solution paths and returning a consensus value. A lightweight router selects the appropriate expert for each query and a web-based GUI supports fine-tuning, indexing and prompt/expert management. We evaluated three representative subdomains in process engineering using automated metrics for source faithfulness, accuracy and relevance. This modular system builds on the unadapted base model and can be extended to new subdomains by adding documents and small adaptation sets, thus avoiding the need for costly end-to-end retraining. This approach offers a practical way to develop trustworthy, domain-specific assistants that can be integrated into simulation and digital twin workflows.