自动构建多分支提示,提升复杂任务处理能力
AMPO: Automatic Multi-Branched Prompt Optimization
- 基于失败案例迭代生成多分支提示结构
- 在五个任务上均优于现有方法,效率更高
- 适合需要多模式处理的复杂提示设计场景
提示工程对提升大语言模型性能至关重要。面对复杂任务时,提示工程师常从示例中提炼多种模式并注入解决方案以优化提示,取得良好效果。然而,现有自动提示优化技术仅限于生成单一流程指令,难以应对多样模式。本文提出AMPO,一种利用失败案例作为反馈、迭代生成多分支提示的自动优化方法。其目标是探索通过多分支结构更好处理复杂任务中的多种模式,引入三个模块:模式识别、分支调整和分支剪枝。在五个任务上的实验表明,AMPO持续取得最佳表现。此外,由于采用最小搜索策略,该方法展现出显著的优化效率。
原文摘要 · Abstract (English)
Prompt engineering is very important to enhance the performance of large language models (LLMs). When dealing with complex issues, prompt engineers tend to distill multiple patterns from examples and inject relevant solutions to optimize the prompts, achieving satisfying results. However, existing automatic prompt optimization techniques are only limited to producing single flow instructions, struggling with handling diverse patterns. In this paper, we present AMPO, an automatic prompt optimization method that can iteratively develop a multi-branched prompt using failure cases as feedback. Our goal is to explore a novel way of structuring prompts with multi-branches to better handle multiple patterns in complex tasks, for which we introduce three modules: Pattern Recognition, Branch Adjustment, and Branch Pruning. In experiments across five tasks, AMPO consistently achieves the best results. Additionally, our approach demonstrates significant optimization efficiency due to our adoption of a minimal search strategy.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。