[论文解读] Instances Need More Care: Rewriting Prompts for Instances with LLMs in the Loop Yields Better Zero-Shot Performance
PRoMPTd 为每个测试实例重写提示,以提供更具体、明确和完整的指引,在八个数据集上实现更好的零-shot 性能,并实现可解释性与对抗性提示防御。
Large language models (LLMs) have revolutionized zero-shot task performance, mitigating the need for task-specific annotations while enhancing task generalizability. Despite its advancements, current methods using trigger phrases such as "Let's think step by step" remain limited. This study introduces PRomPTed, an approach that optimizes the zero-shot prompts for individual task instances following an innovative manner of "LLMs in the loop". Our comprehensive evaluation across 13 datasets and 10 task types based on GPT-4 reveals that PRomPTed significantly outperforms both the naive zero-shot approaches and a strong baseline (i.e., "Output Refinement") which refines the task output instead of the input prompt. Our experimental results also confirmed the generalization of this advantage to the relatively weaker GPT-3.5. Even more intriguingly, we found that leveraging GPT-3.5 to rewrite prompts for the stronger GPT-4 not only matches but occasionally exceeds the efficacy of using GPT-4 as the prompt rewriter. Our research thus presents a huge value in not only enhancing zero-shot LLM performance but also potentially enabling supervising LLMs with their weaker counterparts, a capability attracting much interest recently. Finally, our additional experiments confirm the generalization of the advantages to open-source LLMs such as Mistral 7B and Mixtral 8x7B.
研究动机与目标
- 推动在实例级别进行提示优化以提升零-shot 大模型性能的必要性。
- 提出 PRoMPTd,使用对比演示为每个测试实例重写提示 rho*。
- 证明实例级重写在多个数据集和任务类型上能提高准确性。
- 展示重写后的提示提高可解释性并有助于抵御对抗性提示。
提出的方法
- 定义一个提示重写函数 F,将原始提示 rho 映射为测试实例的重写 rho*。
- 将提示重写形式化为对比演示 D 的少量示例学习,使用专用重写大型语言模型 M_rewrite 进行推理。
- 构建 PRoMT,即跨任务类型(数学、逻辑、代码、内容)共10条提示重写演示的数据集,由 ChatGPT 生成。
- 通过使用 M_rewrite 为每个测试实例生成 rho*,在所有实验中使用 GPT-4 的零-shot 任务大模型 M_task 运行 rho*。
- 在基线(零-shot 与 零-shot CoT)以及面向任务级的变体 PRoMPTd(仅指令)上评估性能。
- 通过消融研究评估推理理由与任务类型信号在重写中的重要性。
实验结果
研究问题
- RQ1每个实例的提示重写是否相较于标准零-shot 与零-shot CoT 基线在多样任务上提升零-shot 性能?
- RQ2实例级提示如何影响数学推理、逻辑推理和代码生成任务的表现?
- RQ3在 PRoMPTd 中包含重写原因与任务类型指示的贡献是什么?
- RQ4PRoMPTd 能否泛化到未知任务类型并有助于抵御对抗性提示?
主要发现
- PRoMPTd 在所有八个数据集上始终优于 naïve 的零-shot 提示。
- 在 MATH 数据集上,PRoMPTd 相对于基线实现约 10% 的绝对提升;在 HumanEval 代码生成上,约提升 5% 的绝对值。
- PRoMPTd(仅指令)相较于面向任务的重写有所提升,但鲁棒性不及逐实例重写。
- 消融研究显示重写原因与任务类型信号对达到最佳性能都很重要。
- 人工评估表明重写后的提示更具体、明确、完整,且结构清晰,幻觉更少。
- PRoMPTd 可以泛化到未见任务类型(如情感分类),并有助于通过可解释的提示变换抵御对抗性提示。
阅读本论文
在 Nubint 阅读器中打开原文,边读边就任意段落提问。
在 Nubint 中阅读本论文本解读由 AI 根据论文原文生成,引用前请核对原文。