AMPO: Automatic Multi-Branched Prompt Optimization

Published: 19 Sept 2024, Last Modified: 30 Sept 2024OpenReview Archive Direct UploadEveryoneCC BY 4.0
Abstract: Prompt engineering is very important to en- hance the performance of large language mod- els (LLMs). When dealing with complex is- sues, human experts tend to distill multiple patterns from data 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 opti- mization 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 re- sults. Additionally, our approach demonstrates significant optimization efficiency due to our adoption of a minimal search strategy.
Loading