Momentum-Aided Prompt Optimization (MAPO) enhances the efficiency and efficacy of prompt optimization for Large Language Models (LLMs). Building on ProTeGi, MAPO uses positive natural language "gradients" and a momentum-based extension to refine prompts effectively. By tracking gradient history, MAPO avoids local minima and oscillations. It also utilizes beam search and an Upper Confidence Bound (UCB) algorithm for balanced candidate expansion and selection. Benchmark testing shows that MAPO achieves faster convergence time with fewer API calls and higher F1 scores than ProTeGi, proving it as a robust and scalable solution for automated prompt engineering in LLMs.
翻译:动量辅助提示优化(MAPO)提升了大型语言模型(LLM)提示优化的效率与效果。该方法基于ProTeGi框架,利用正向自然语言“梯度”及动量扩展机制有效优化提示。通过追踪梯度历史,MAPO能够规避局部极小值与振荡现象。该方法同时结合集束搜索与上置信界(UCB)算法,实现候选提示的均衡扩展与选择。基准测试表明,相较于ProTeGi,MAPO以更少的API调用次数获得更快的收敛速度与更高的F1分数,证明了其作为LLM自动化提示工程方案的鲁棒性与可扩展性。