评估大模型在工业代码生成中的表现,发现提示技巧和模型规模影响最大。
Evaluating Large Language Models for Functional and Maintainable Code in Industrial Settings: A Case Study at ASML
- 设计专用评估框架与编译成功率指标build@k,适配企业私有代码环境。
- 少样本和思维链提示使代码编译成功率达最高,模型规模影响显著。
- 代码专用模型优势不明显,适合关注工业级代码可维护性的研发团队。
大语言模型在多个领域表现出色,尤其在开源代码生成方面成效显著。然而,在存在特定领域约束和代码依赖关系的专有工业环境中,其适用性仍不明确。本文与阿斯麦公司(ASML)平版部门合作,开展一项案例研究,考察大模型在封闭、高度专业化软件环境中生成功能性与可维护性代码的能力。研究构建了针对阿斯麦专有代码库的评估框架,并提出新的基准测试集与评估指标build@k,用于衡量生成代码能否在真实工业仓库中成功编译和集成。通过对比不同提示技术、通用模型与代码专用模型的性能,以及分析模型规模的影响,结合匹配与执行两类指标进行评估。结果表明,提示方法与模型规模对输出质量有显著影响,其中少样本和思维链提示获得最高的编译成功率;代码专用模型与通用模型之间的性能差异不显著,且在不同模型家族间变化较大。
原文摘要 · Abstract (English)
Large language models have shown impressive performance in various domains, including code generation across diverse open-source domains. However, their applicability in proprietary industrial settings, where domain-specific constraints and code interdependencies are prevalent, remains largely unexplored. We present a case study conducted in collaboration with the leveling department at ASML to investigate the performance of LLMs in generating functional, maintainable code within a closed, highly specialized software environment. We developed an evaluation framework tailored to ASML's proprietary codebase and introduced a new benchmark. Additionally, we proposed a new evaluation metric, build@k, to assess whether LLM-generated code successfully compiles and integrates within real industrial repositories. We investigate various prompting techniques, compare the performance of generic and code-specific LLMs, and examine the impact of model size on code generation capabilities, using both match-based and execution-based metrics. The findings reveal that prompting techniques and model size have a significant impact on output quality, with few-shot and chain-of-thought prompting yielding the highest build success rates. The difference in performance between the code-specific LLMs and generic LLMs was less pronounced and varied substantially across different model families.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。