[论文解读] Teach Better or Show Smarter? On Instructions and Exemplars in Automatic Prompt Optimization
本文研究了在大语言模型的自动提示优化(APO)中,指令优化(IO)与样本选择(ES)的相对影响及联合影响。结果表明,复用验证集上模型生成的样本可显著提升性能,优于仅使用IO的方法;即使采用简单的ES方法(如随机搜索),其性能也优于最先进的IO方法;且IO与ES的结合能产生协同增益,挑战了当前研究对IO的过度关注。
Large language models have demonstrated remarkable capabilities, but their performance is heavily reliant on effective prompt engineering. Automatic prompt optimization (APO) methods are designed to automate this and can be broadly categorized into those targeting instructions (instruction optimization, IO) vs. those targeting exemplars (exemplar optimization, EO). Despite their shared objective, these have evolved rather independently, with IO receiving more research attention recently. This paper seeks to bridge this gap by comprehensively comparing the performance of representative IO and EO techniques both isolation and combination on a diverse set of challenging tasks. Our findings reveal that intelligently reusing model-generated input-output pairs obtained from evaluating prompts on the validation set as exemplars, consistently improves performance on top of IO methods but is currently under-investigated. We also find that despite the recent focus on IO, how we select exemplars can outweigh how we optimize instructions, with EO strategies as simple as random search outperforming state-of-the-art IO methods with seed instructions without any optimization. Moreover, we observe a synergy between EO and IO, with optimal combinations surpassing the individual contributions. We conclude that studying exemplar optimization both as a standalone method and its optimal combination with instruction optimization remain a crucial aspect of APO and deserve greater consideration in future research, even in the era of highly capable instruction-following models.
研究动机与目标
- 比较自动提示优化(APO)中代表性指令优化(IO)与样本选择(ES)方法的性能。
- 探究尽管IO受到更多研究关注,样本选择是否仍能超越指令优化。
- 在计算资源受限的条件下,评估IO与ES之间的协同效应。
- 检验复用验证集上模型生成的输入-输出对作为样本的潜力。
- 通过展示ES被低估的价值,挑战当前研究对IO的主流关注。
提出的方法
- 作者在BIG-Bench Hard(BBH)和MMLU基准的多样化、具有挑战性的任务上,评估了最先进的IO与ES技术。
- 采用PaLM 2、Gemini 1.0和Gemini 1.5作为目标模型,以确保结果的泛化性。
- 对于ES,从模型在验证集上的输出生成样本,并将其复用为少样本示例。
- 在相同计算预算下,比较独立的IO、独立的ES以及IO+ES混合策略。
- 使用随机搜索及其他简单ES策略,评估无需复杂优化的性能表现。
- 分析样本质量与选择策略对最终模型性能的影响。
实验结果
研究问题
- RQ1在自动提示优化中,样本选择(ES)是否优于指令优化(IO)?
- RQ2简单的样本选择策略(如随机搜索)能否超越最先进的IO方法?
- RQ3复用验证集上模型生成的样本可带来多大的性能提升?
- RQ4在APO中,IO与ES结合是否具有协同效应?
- RQ5在大语言模型提示工程中,样本选择的重要性是否与指令优化相当?
主要发现
- 有策略地复用验证集上模型生成的样本,可始终显著提升性能,优于仅使用IO的方法。
- 即使采用简单的ES策略(如随机搜索),在未优化的初始指令下,其性能也优于最先进的IO方法。
- 高效样本选择带来的性能增益,可能超过先进指令优化的增益。
- IO与ES的结合可取得更优结果,表明二者存在协同效应,且整体表现优于各自独立贡献之和。
- 本研究发现,最先进的IO方法可能隐式生成高质量样本,而这些样本对性能的贡献甚至超过优化后的指令本身。
阅读本论文
在 Nubint 阅读器中打开原文,边读边就任意段落提问。
在 Nubint 中阅读本论文本解读由 AI 根据论文原文生成,引用前请核对原文。