Large Language Models are highly sensitive to prompt formulation, necessitating automatic prompt optimization to unlock their full potential. While evolutionary algorithms have emerged as the dominant paradigm, they suffer from a critical bottleneck: data efficiency. Current methods treat the development dataset as a static benchmark, wasting significant compute budget on uninformative data. In this work, we introduce APEX (Automatic Prompt Engineering eXpert), a novel framework that optimizes the data usage alongside the prompt search. APEX dynamically stratifies the dataset into Easy, Hard, and Mixed tiers based on the optimization lineage. By prioritizing the Mixed tier, which identifies the data where the LLM has mixed performance, we identify two high-leverage subsets: the addressable frontier for generating informative mutations and the rank-sensitive frontier for distinguishing candidate quality. We evaluate APEX across three diverse benchmarks: IFBench, SimpleQA Verified, and FACTS Grounding. Under a fixed budget of 5,000 evaluation calls, due to its data efficiency, APEX outperforms the initial prompt by an average of 11.2% on Gemini 2.5 Flash and 6.8% on Gemma 3 27B, demonstrating that a data-centric approach is key to efficient and effective prompt optimization.
翻译:[translated abstract in Chinese]
大型语言模型对提示的表述高度敏感,因此需要自动提示优化以释放其全部潜力。尽管进化算法已成为主流范式,但其面临一个关键瓶颈:数据效率。当前方法将开发数据集视为静态基准,在无信息量的数据上浪费大量计算资源。本文提出APEX(自动化提示工程专家),一种在提示搜索过程中同步优化数据使用的新型框架。APEX根据优化历程将数据集动态划分为简单、困难及混合三个层级。通过优先处理混合层级(即识别语言模型性能参差不齐的数据),我们定位了两个高杠杆子集:用于生成信息性突变的可寻优前沿,以及用于区分候选质量的排名敏感前沿。我们在三个不同基准(IFBench、SimpleQA Verified及FACTS Grounding)上评估了APEX。在固定5000次评估调用的预算下,凭借其数据效率优势,APEX在Gemini 2.5 Flash上平均提升初始提示性能11.2%,在Gemma 3 27B上提升6.8%,证明了以数据为中心的方法对于高效且有效的提示优化至关重要。