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 interface. We support our approach with an extensive evaluation that comes with code compilation statistics and user ratings. We found that a Retrieval-Augmented Generation (RAG) supported coding assistant can work in low-data domains by using extensive prompt engineering and directed retrieval.


翻译:可编程逻辑控制器采用专有代码方言操作,这给训练代码助手带来了挑战。当前的大型语言模型基于大规模代码数据集训练,能够直接生成符合IEC 61131-3标准的代码,但它们既不了解特定的功能块,也不熟悉相关项目代码。此外,像三菱电机及其客户等企业不信任云服务提供商。因此,构建自主的代码生成智能体成为应对这一问题的理想解决方案。本研究提出了一种面向工业应用的低数据领域代码助手解决方案。我们展示了如何在不微调大型模型的情况下,通过微调小型本地模型以适应边缘设备使用,实现高质量的代码生成。我们的工具使多个AI模型相互竞争,运用推理机制,自动修正错误,并通过在聊天界面直接编译代码来验证其有效性。我们通过包含代码编译统计数据和用户评分的全面评估来支持该方法。研究发现,通过采用精细的提示工程和定向检索技术,基于检索增强生成的代码助手能够在低数据领域有效工作。

0
下载
关闭预览

相关内容

代码(Code)是专知网的一个重要知识资料文档板块,旨在整理收录论文源代码、复现代码,经典工程代码等,便于用户查阅下载使用。
Python图像处理,366页pdf,Image Operators Image Processing in Python
国家自然科学基金
17+阅读 · 2017年12月31日
国家自然科学基金
3+阅读 · 2015年12月31日
国家自然科学基金
4+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2014年12月31日
国家自然科学基金
1+阅读 · 2014年12月31日
VIP会员
相关基金
国家自然科学基金
17+阅读 · 2017年12月31日
国家自然科学基金
3+阅读 · 2015年12月31日
国家自然科学基金
4+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2014年12月31日
国家自然科学基金
1+阅读 · 2014年12月31日
Top
微信扫码咨询专知VIP会员