arXiv:2410.19499cs.CL2024-10中稿 · NAACL被引 7

MAPO通过动量机制提升大模型提示词优化效率与精度。

Introducing MAPO: Momentum-Aided Gradient Descent Prompt Optimization

  • 引入动量追踪梯度历史,避免局部最优和震荡
  • 比ProTeGi更快收敛,减少API调用次数,F1得分更高
  • 适合需要自动化提示工程的工业级大模型应用

动量辅助提示优化(MAPO)提升了大语言模型(LLMs)提示词优化的效率与效果。基于ProTeGi,MAPO采用正向自然语言“梯度”及动量扩展机制,有效优化提示词。通过追踪梯度历史,避免局部极小值和振荡。同时结合束搜索与置信上界(UCB)算法,实现候选提示的平衡扩展与选择。基准测试显示,相比ProTeGi,MAPO在更少的API调用下实现更快收敛,并取得更高的F1分数,证明其在大模型自动化提示工程中具备鲁棒性与可扩展性。

原文摘要 · Abstract (English)

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.

提示工程优化算法大模型

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。