Vendor-Aware Industrial Agents: RAG-Enhanced LLMs for Secure On-Premise PLC Code Generation
Joschka Kersting, Michael Rummel, Gesa Benndorf

TL;DR
This paper presents a vendor-aware, secure, on-premise code generation system for industrial PLCs using RAG-enhanced LLMs, enabling high-quality, trustworthy automation code without cloud reliance.
Contribution
It introduces a low-data, domain-specific coding assistant for industrial PLCs that leverages RAG and small local models, avoiding large model fine-tuning.
Findings
High-quality code generation achieved without large model fine-tuning
Effective use of retrieval-augmented generation in low-data domains
Automatic bug correction and code validation in chat interface
Abstract
Programmable Logic Controllers are operated by proprietary code dialects; this makes it challenging to train coding assistants. Current LLMs are trained on large code datasets and are capable of writing IEC 61131-3 compatible code out of the box, but they neither know specific function blocks, nor related project code. Moreover, companies like Mitsubishi Electric and their customers do not trust cloud providers. Hence, an own coding agent is the desired solution to cope with this. In this study, we present our work on a low-data domain coding assistant solution for industrial use. We show how we achieved high quality code generation without fine-tuning large models and by fine-tuning small local models for edge device usage. Our tool lets several AI models compete with each other, uses reasoning, corrects bugs automatically and checks code validity by compiling it directly in the chat…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsSmart Grid Security and Resilience · Advanced Malware Detection Techniques · Physical Unclonable Functions (PUFs) and Hardware Security
