Lune

EMNLP2023顶会

Automatic Prompt Optimization with "Gradient Descent" and Beam Search

Reid Pryzant, Dan Iter, Jerry Li, Yin Tat Lee, Chenguang Zhu, Michael Zeng

摘要

Large Language Models (LLMs) have shown impressive performance as general purpose agents, but their abilities remain highly dependent on prompts which are hand written with onerous trial-and-error effort. We propose a simple and nonparametric solution to this problem, Prompt Optimization with Textual Gradients (ProTeGi), which is inspired by numerical gradient descent to automatically improve prompts, assuming access to training data and an LLM API. The algorithm uses minibatches of data to form natural language "gradients" that criticize the current prompt, much like how numerical gradients point in the direction of error ascent. The natural language gradients are then "propagated" into the prompt by editing the prompt in the opposite semantic direction of the gradient. These gradient descent steps are guided by a beam search and bandit selection procedure which significantly improves algorithmic efficiency. Preliminary results across three benchmark NLP tasks and the novel problem of LLM jailbreak detection suggest that Automatic Prompt Optimization can outperform prior prompt editing techniques and improve an initial prompt's performance by up to 31%, by using data to rewrite vague task descriptions into more precise annotation instructions. 1

问 Lune

几分钟读透这篇 Paper,不用再花一下午。

Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。

已有 156 篇顶会 Paper 引用了它。别等审稿人问起,先弄清它们发现了什么。

可以从这些问题问起

Lune 可以查阅

全文 · 引用它的顶会 Paper · 相关的 Paper

获取答案

免费开始,无需绑卡

脉络

  • Quantifying Language Models' Sensitivity to Spurious Features in Prompt Design or: How I learned to start worrying about prompt formatting 引用了 Fantastically Ordered Prompts and Where to Find Them: Overcoming Few-Shot Prompt Order Sensitivity
  • Quantifying Language Models' Sensitivity to Spurious Features in Prompt Design or: How I learned to start worrying about prompt formatting 引用了 Large Language Models are Human-Level Prompt Engineers
  • Reflexion: language agents with verbal reinforcement learning 引用了 Teaching Large Language Models to Self-Debug
  • Promptbreeder: Self-Referential Self-Improvement via Prompt Evolution 引用了 Fantastically Ordered Prompts and Where to Find Them: Overcoming Few-Shot Prompt Order Sensitivity
  • Promptbreeder: Self-Referential Self-Improvement via Prompt Evolution 引用了 Large Language Models as Optimizers
  • Large Language Models as Optimizers 引用了 Promptbreeder: Self-Referential Self-Improvement via Prompt Evolution
  • Promptbreeder: Self-Referential Self-Improvement via Prompt Evolution 引用了 Large Language Models are Human-Level Prompt Engineers
  • Large Language Models as Optimizers 引用了 Fantastically Ordered Prompts and Where to Find Them: Overcoming Few-Shot Prompt Order Sensitivity
  • Large Language Models as Optimizers 引用了 Teaching Large Language Models to Self-Debug
  • Large Language Models as Optimizers 引用了 Large Language Models are Human-Level Prompt Engineers
  • Optimizing Prompts for Text-to-Image Generation 引用了 Large Language Models are Human-Level Prompt Engineers
  • Large Language Models are Human-Level Prompt Engineers 引用了 Fantastically Ordered Prompts and Where to Find Them: Overcoming Few-Shot Prompt Order Sensitivity
  • GEPA: Reflective Prompt Evolution Can Outperform Reinforcement Learning 引用了 Reflexion: language agents with verbal reinforcement learning
  • GEPA: Reflective Prompt Evolution Can Outperform Reinforcement Learning 引用了 Promptbreeder: Self-Referential Self-Improvement via Prompt Evolution
  • GEPA: Reflective Prompt Evolution Can Outperform Reinforcement Learning 引用了 Large Language Models as Optimizers
  • GEPA: Reflective Prompt Evolution Can Outperform Reinforcement Learning 引用了 Large Language Models are Human-Level Prompt Engineers
它引用的引用它的从左到右按年份排列,引用越多,位置越高。

引用它的顶会 Paper156

  1. Reflexion: language agents with verbal reinforcement learningNoah Shinn, Federico Cassano, Ashwin Gopinath, Karthik Narasimhan 等NeurIPS 2023 · 5,828 次引用
  2. Large Language Models as OptimizersChengrun Yang, Xuezhi Wang, Yifeng Lu, Hanxiao Liu 等ICLR 2024 · 817 次引用
  3. Quantifying Language Models' Sensitivity to Spurious Features in Prompt Design or: How I learned to start worrying about prompt formattingMelanie Sclar, Yejin Choi, Yulia Tsvetkov, Alane SuhrICLR 2024 · 682 次引用
  4. GEPA: Reflective Prompt Evolution Can Outperform Reinforcement LearningLakshya A. Agrawal, Shangyin Tan, Dilara Soylu, Noah Ziems 等ICLR 2026 · 466 次引用
  5. Promptbreeder: Self-Referential Self-Improvement via Prompt EvolutionChrisantha Fernando, Dylan Banarse, Henryk Michalewski, Simon Osindero 等ICML 2024 · 432 次引用

它引用的 Paper12

  1. Fantastically Ordered Prompts and Where to Find Them: Overcoming Few-Shot Prompt Order SensitivityYao Lu, Max Bartolo, Alastair Moore, Sebastian Riedel 等ACL 2022 · 1,494 次引用
  2. Teaching Large Language Models to Self-DebugXinyun Chen, Maxwell Lin, Nathanael Schärli, Denny ZhouICLR 2024 · 1,085 次引用
  3. Why Johnny Can't Prompt: How Non-AI Experts Try (and Fail) to Design LLM PromptsJ. D. Zamfirescu-Pereira, Richmond Y. Wong, Bjoern Hartmann, Qian YangCHI 2023 · 892 次引用
  4. Optimizing Prompts for Text-to-Image GenerationYaru Hao, Zewen Chi, Li Dong, Furu WeiNeurIPS 2023 · 303 次引用
  5. Large Language Models are Human-Level Prompt EngineersYongchao Zhou, Andrei Ioan Muresanu, Ziwen Han, Keiran Paster 等ICLR 2023 · 297 次引用

相关 Paper

  1. Unleashing the Potential of Large Language Models as Prompt Optimizers: Analogical Analysis with Gradient-based Model OptimizersXinyu Tang, Xiaolei Wang, Wayne Xin Zhao, Siyuan Lu 等AAAI 2025 · 36 次引用
  2. PRompt Optimization in Multi-Step Tasks (PROMST): Integrating Human Feedback and Heuristic-based SamplingYongchao Chen, Jacob Arkin, Yilun Hao, Yang Zhang 等EMNLP 2024 · 6 次引用
  3. GReaTer: Gradients Over Reasoning Makes Smaller Language Models Strong Prompt OptimizersSarkar Snigdha Sarathi Das, Ryo Kamoi, Bo Pang, Yusen Zhang 等ICLR 2025
  4. metaTextGrad: Automatically optimizing language model optimizersGuowei Xu, Mert Yüksekgönül, Carlos Guestrin, James Y. ZouNeurIPS 2025 · 5 次引用
  5. Task Facet Learning: A Structured Approach To Prompt OptimizationGurusha Juneja, Gautam Jajoo, Hua Li, Jian Jiao 等ACL Findings 2025 · 3 次引用
黄昏的海面,两侧是细线勾勒的悬崖