动态选数据优化提示词,让大模型更高效发挥潜力。
APEX: Automated Prompt Engineering eXpert with Dynamic Data Selection

- 根据模型表现动态分层数据,聚焦难题样本
- 5000次调用内提升11.2%(Gemini 2.5 Flash)
- 适合追求高效提示工程的开发者与研究者
大型语言模型对提示词极为敏感,需自动优化以释放其全部潜力。现有进化算法虽主流,但存在数据效率低下问题:将开发数据集视为静态基准,浪费大量算力在无信息量的数据上。本文提出APEX(自动提示工程专家),在搜索提示词的同时优化数据使用。APEX基于优化历程动态将数据划分为易、难、混合三类,优先处理混合类数据——即模型表现不稳定的样本,从中识别出两类高价值数据子集:用于生成有效变异的可改进边界,以及用于区分候选质量的排序敏感边界。在IFBench、SimpleQA Verified和FACTS Grounding三个不同基准上评估,固定5000次评估调用预算下,相比初始提示词,APEX在Gemini 2.5 Flash上平均提升11.2%,在Gemma 3 27B上提升6.8%,证明数据驱动方法是高效提示优化的关键。
原文摘要 · Abstract (English)
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.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。