Tuning LLM-based Code Optimization via Meta-Prompting: An Industrial Perspective
Jingzhi Gong, Rafail Giavrimis, Paul Brookes, Vardan Voskanyan, Fan Wu, Mari Ashiga, Matthew Truscott, Mike Basios, Leslie Kanthan, Jie Xu, Zheng Wang

TL;DR
This paper presents MPCO, a meta-prompting framework that automatically generates effective prompts for multiple LLMs to optimize code, overcoming prompt engineering challenges in industrial multi-LLM systems.
Contribution
We introduce MPCO, a novel meta-prompting approach that dynamically creates task-specific prompts for diverse LLMs, enhancing code optimization in industrial settings.
Findings
Achieves up to 19.06% performance improvement.
96% of top optimizations are meaningful edits.
Effective context integration is crucial for success.
Abstract
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 metaprompting 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…
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
TopicsModel-Driven Software Engineering Techniques · Software Engineering Research · Embedded Systems Design Techniques
