arXiv:2608.11219cs.AIcs.CL2026-08中稿 · IJCAI

分段优化提示词,避免改进一个功能时破坏其他功能。

From Monolithic to Modular: Segment-level Automatic Prompt Optimization

论文配图:From Monolithic to Modular: Segment-level Automatic Prompt Optimization
图 1 · 摘自论文原文
  • 将提示词拆分为角色、上下文等模块,针对性优化弱项
  • 在多个数据集上平均得分超越零样本和现有强基线方法
  • 适合需要精细调整提示词的AI应用开发者

自动提示词优化(APO)通常整体重写提示词,可能改善某一行为却损害其他方面。本文提出SAPO,一种分段级APO方法,将提示词分解为角色、上下文、任务和输出格式,并基于表现最好与最差的前5个示例进行针对性改进。优化循环使用单一大模型,结合静态元提示和结构化输出实现分段、弱点分析与候选生成。我们设计了训练/验证流程及两阶段生成机制:(1) 分段诊断与建议提取,(2) 基于强弱段信号约束的候选合成。在SQuADv2、TweetEval、XSUM、CommonGen和GSM8K数据集上,使用GPT-3.5-Turbo和GPT-4o-mini进行评估,SAPO在平均得分上优于零样本及多种强基线方法,包括APE、OPRO、EvoPrompt、GEPA和StraGO。

原文摘要 · Abstract (English)

Automatic Prompt Optimization (APO) often rewrites prompts monolithically, which can improve one behavior while degrading others. We present SAPO, a segment-level APO method that decomposes prompts into role, context, tasks, and output format, then applies targeted improvements based on top-5 and bottom-5 examples. The optimization loop uses one LLM with static meta-prompts and structured outputs for segmentation, weakness analysis, and candidate generation. We describe a train/validation protocol and a two-stage generation process: (1) segment-level diagnosis and recommendation extraction, (2) candidate synthesis constrained by weak/strong segment signals. Using the evaluation setup across SQuADv2, TweetEval, XSUM, CommonGen, and GSM8K on GPT-3.5-Turbo and GPT-4o-mini, SAPO achieves the best average score against Zero-shot and strong APO baselines including APE, OPRO, EvoPrompt, GEPA, and StraGO.

提示优化分段改进大模型

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。