首个面向嵌入式开发的LLM评测基准,揭示模型在硬件编程中的真实表现。
EmbedAgent: Benchmarking Large Language Models in Embedded System Development
- 构建EmbedAgent模拟开发角色,测试LLM在软硬结合任务中的能力
- 主流模型在电路设计上仅50%通过率,跨平台迁移最高仅73.8%
- 提出检索增强与编译反馈策略,显著提升生成准确率
大型语言模型(LLMs)在诸多任务中展现潜力,但缺乏针对嵌入式系统开发的评测基准。本文提出EmbedAgent范式,模拟嵌入式程序员、架构师与集成者等真实角色,使LLM能在连接数字与物理系统的任务中被评估。为此,我们构建了首个综合性嵌入式开发评测基准Embedbench,包含126个案例,覆盖9类电子元件及3种硬件平台。对10个主流LLM的实验表明:即便案例简单,DeepSeek-R1在提供原理图时仅达55.6%的pass@1率,自动生成原理图时更低至50.0%;在跨平台迁移任务中,其在Raspberry Pi Pico上微调后最高达73.8%,但在ESP-IDF上仅29.4%。有趣的是,通用聊天模型如DeepSeek-V3常无法利用领域预训练知识,而推理型模型则过度思考、忽略高效知识。基于此,我们提出检索增强生成与编译反馈策略,使DeepSeek-R1在有正确原理图时达到65.1%的通过率,无图时达53.1%;Arduino到ESP32迁移任务准确率从21.4%提升至27.8%。
原文摘要 · Abstract (English)
Large Language Models (LLMs) have shown promise in various tasks, yet few benchmarks assess their capabilities in embedded system development. In this paper, we introduce EmbedAgent, a paradigm designed to simulate real-world roles in embedded system development, such as Embedded System Programmer, Architect, and Integrator. This paradigm enables LLMs to be tested in tasks that bridge the gap between digital and physical systems, allowing for a more comprehensive assessment of their capabilities. To evaluate LLMs on these tasks, we propose Embedbench, the first comprehensive benchmark for embedded system programming, circuit design, and cross-platform migration. Embedbench consists of 126 cases, covering 9 electronic components across 3 hardware platforms. Through extensive experiments on 10 mainstream LLMs, we uncover several key findings. Surprisingly, despite the simplicity of the cases, DeepSeek-R1 achieves only a 55.6% pass@1 rate when provided with schematic information, and 50.0% when tasked with generating the schematics itself. In the cross-platform migration tasks, LLMs show relatively strong performance with MicroPython on the Raspberry Pi Pico (with the top model achieving 73.8% pass@1), but perform poorly on ESP-IDF, where the best model reaches only 29.4% pass@1. Interestingly, we observe that general-purpose chat LLMs like DeepSeek-V3 often fail to utilize relevant pre-trained knowledge in this domain, while reasoning LLMs tend to overthink and overlook efficient knowledge during pretraining. Based on these insights, we propose two strategies: retrieval augmented generation and compiler feedback-to enhance LLM performance. These strategies result in significant improvements, with Deepseek-R1 reaching a 65.1% pass@1 with correct schematics, and 53.1% without. Additionally, the accuracy of the Arduino to ESP32 migration task improves from 21.4% to 27.8%.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。