一句话:提出Mpco框架,用元提示自动生成跨LLM的代码优化提示,在五个真实代码库上实现最高19.06%的性能提升。
工业级多LLM自动代码优化平台面临一个关键瓶颈:为某个LLM优化的提示往往在其他模型上失效,导致昂贵的模型专属提示工程,严重阻碍多LLM系统的生产部署。本文提出Meta-Prompted Code Optimization(Mpco)框架,利用元提示动态合成上下文感知的优化提示,融合项目元数据、任务需求与LLM特定上下文,并可自动验证与扩展,作为ARTEMIS代码优化平台的核心组件。作者在五个真实代码库上进行了总计366小时的运行时基准评测:Mpco整体性能提升最高达19.06%,在所有对比系统中取得最佳统计排名;分析显示96%的顶级优化来自有意义的代码编辑。通过系统消融实验与元提示器敏感性分析,作者发现全面的上下文整合是有效元提示的关键,且主流LLM均可有效充当元提示器,为工业实践者提供了可操作的洞见。
There is a growing interest in leveraging multiple large language models (LLMs) for automated code optimization. However, industrial platforms deploying multiple LLMs face a critical challenge: prompts optimized for one LLM often fail with others, requiring expensive model-specific prompt engineering. This cross-model prompt engineering bottleneck severely limits the practical deployment of multi-LLM systems in production environments. We introduce Meta-Prompted Code Optimization (Mpco), a framework that automatically generates high-quality, task-specific prompts across diverse LLMs while maintaining industrial efficiency requirements. Mpco leverages meta-prompting to dynamically synthesize context-aware optimization prompts by integrating project metadata, task requirements, and LLM-specific contexts. It is an essential part of the ARTEMIS code optimization platform for automated validation and scaling.Our comprehensive evaluation on five real-world codebases with 366 hours of runtime benchmarking demonstrates Mpco’s effectiveness: it achieves overall performance improvements up to 19.06% with the best statistical rank across all systems compared to baseline methods. Analysis shows that 96% of the top-performing optimizations stem from meaningful edits. Through systematic ablation studies and meta-prompter sensitivity analysis, we identify that comprehensive context integration is essential for effective meta-prompting and that major LLMs can serve effectively as meta-prompters, providing actionable insights for industrial practitioners.
DOI 原文 ·
@inproceedings{paperbot9521,
title = {Tuning LLM-based Code Optimization via Meta-Prompting: An Industrial Perspective},
author = {Jingzhi Gong and Rafail Giavrimis and Paul Brookes and Vardan Voskanyan and Fan Wu and Mari Ashiga and Matthew Truscott and Mike Basios and Leslie Kanthan and Jie Xu and Zheng Wang},
booktitle = {ASE},
year = {2025},
doi = {10.1109/ase63991.2025.00295}
}