Lune

ICLR2024Top-tier venue

Large Language Models as Optimizers

Chengrun Yang, Xuezhi Wang, Yifeng Lu, Hanxiao Liu, Quoc V. Le, Denny Zhou, Xinyun Chen

Abstract

Optimization is ubiquitous. While derivative-based algorithms have been powerful tools for various problems, the absence of gradient imposes challenges on many real-world applications. In this work, we propose Optimization by PROmpting (OPRO), a simple and effective approach to leverage large language models (LLMs) as optimizers, where the optimization task is described in natural language. In each optimization step, the LLM generates new solutions from the prompt that contains previously generated solutions with their values, then the new solutions are evaluated and added to the prompt for the next optimization step. We first showcase OPRO on linear regression and traveling salesman problems, then move on to our main application in prompt optimization, where the goal is to find instructions that maximize the task accuracy. With a variety of LLMs, we demonstrate that the best prompts optimized by OPRO outperform human-designed prompts by up to 8% on GSM8K, and by up to 50% on Big-Bench Hard tasks. Code at https://github.com/google-deepmind/opro .

Ask Lune

Know this paper in minutes, not an afternoon.

Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.

269 top-tier papers have cited it since. Know what they found before your reviewers do.

Questions to start from

Lune can draw on

the full paper · the top-tier papers that cite it · related work

Get the answer

Free to start. No credit card required.

Lineage

  • Self-Refine: Iterative Refinement with Self-Feedback cites Chain-of-Thought Prompting Elicits Reasoning in Large Language Models
  • Fantastically Ordered Prompts and Where to Find Them: Overcoming Few-Shot Prompt Order Sensitivity cites Calibrate Before Use: Improving Few-shot Performance of Language Models
  • Large Language Models are Zero-Shot Reasoners cites Fantastically Ordered Prompts and Where to Find Them: Overcoming Few-Shot Prompt Order Sensitivity
  • Large Language Models are Zero-Shot Reasoners cites Chain-of-Thought Prompting Elicits Reasoning in Large Language Models
  • Promptbreeder: Self-Referential Self-Improvement via Prompt Evolution cites Self-Refine: Iterative Refinement with Self-Feedback
  • Promptbreeder: Self-Referential Self-Improvement via Prompt Evolution cites Fantastically Ordered Prompts and Where to Find Them: Overcoming Few-Shot Prompt Order Sensitivity
  • Promptbreeder: Self-Referential Self-Improvement via Prompt Evolution cites Large Language Models are Zero-Shot Reasoners
  • Promptbreeder: Self-Referential Self-Improvement via Prompt Evolution cites Chain-of-Thought Prompting Elicits Reasoning in Large Language Models
  • ReEvo: Large Language Models as Hyper-Heuristics with Reflective Evolution cites Self-Refine: Iterative Refinement with Self-Feedback
  • Chain-of-Thought Reasoning Without Prompting cites Large Language Models are Zero-Shot Reasoners
  • Chain-of-Thought Reasoning Without Prompting cites Chain-of-Thought Prompting Elicits Reasoning in Large Language Models
  • Chain-of-Thought Prompting Elicits Reasoning in Large Language Models cites Calibrate Before Use: Improving Few-shot Performance of Language Models
  • Evolution of Heuristics: Towards Efficient Automatic Algorithm Design Using Large Language Model cites Promptbreeder: Self-Referential Self-Improvement via Prompt Evolution
  • Evolution of Heuristics: Towards Efficient Automatic Algorithm Design Using Large Language Model cites Chain-of-Thought Prompting Elicits Reasoning in Large Language Models
  • GEPA: Reflective Prompt Evolution Can Outperform Reinforcement Learning cites Self-Refine: Iterative Refinement with Self-Feedback
  • GEPA: Reflective Prompt Evolution Can Outperform Reinforcement Learning cites Promptbreeder: Self-Referential Self-Improvement via Prompt Evolution
  • GEPA: Reflective Prompt Evolution Can Outperform Reinforcement Learning cites Chain-of-Thought Prompting Elicits Reasoning in Large Language Models
Builds onCited byLeft to right by year; the more cited, the higher.

Cited by top-tier papers269

  1. GEPA: Reflective Prompt Evolution Can Outperform Reinforcement LearningLakshya A. Agrawal, Shangyin Tan, Dilara Soylu, Noah Ziems et al.ICLR 2026 · 466 citations
  2. Promptbreeder: Self-Referential Self-Improvement via Prompt EvolutionChrisantha Fernando, Dylan Banarse, Henryk Michalewski, Simon Osindero et al.ICML 2024 · 432 citations
  3. ReEvo: Large Language Models as Hyper-Heuristics with Reflective EvolutionHaoran Ye, Jiarui Wang, Zhiguang Cao, Federico Berto et al.NeurIPS 2024 · 424 citations
  4. Chain-of-Thought Reasoning Without PromptingXuezhi Wang, Denny ZhouNeurIPS 2024 · 305 citations
  5. Evolution of Heuristics: Towards Efficient Automatic Algorithm Design Using Large Language ModelFei Liu, Xialiang Tong, Mingxuan Yuan, Xi Lin et al.ICML 2024 · 238 citations

Builds on22

  1. Chain-of-Thought Prompting Elicits Reasoning in Large Language ModelsJason Wei, Xuezhi Wang, Dale Schuurmans, Maarten Bosma et al.NeurIPS 2022 · 22,562 citations
  2. Large Language Models are Zero-Shot ReasonersTakeshi Kojima, Shixiang Shane Gu, Machel Reid, Yutaka Matsuo et al.NeurIPS 2022 · 8,168 citations
  3. Self-Refine: Iterative Refinement with Self-FeedbackAman Madaan, Niket Tandon, Prakhar Gupta, Skyler Hallinan et al.NeurIPS 2023 · 4,972 citations
  4. Calibrate Before Use: Improving Few-shot Performance of Language ModelsZihao Zhao, Eric Wallace, Shi Feng, Dan Klein et al.ICML 2021 · 1,843 citations
  5. Fantastically Ordered Prompts and Where to Find Them: Overcoming Few-Shot Prompt Order SensitivityYao Lu, Max Bartolo, Alastair Moore, Sebastian Riedel et al.ACL 2022 · 1,494 citations

Related papers

  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 et al.AAAI 2025 · 36 citations
  2. PRompt Optimization in Multi-Step Tasks (PROMST): Integrating Human Feedback and Heuristic-based SamplingYongchao Chen, Jacob Arkin, Yilun Hao, Yang Zhang et al.EMNLP 2024 · 6 citations
  3. Automatic Prompt Optimization with "Gradient Descent" and Beam SearchReid Pryzant, Dan Iter, Jerry Li, Yin Tat Lee et al.EMNLP 2023 · 137 citations
  4. Revisiting OPRO: The Limitations of Small-Scale LLMs as OptimizersTuo Zhang, Jinyue Yuan, Salman AvestimehrACL Findings 2024 · 5 citations
  5. Automatic Engineering of Long PromptsCho-Jui Hsieh, Si Si, Felix X. Yu, Inderjit S. DhillonACL Findings 2024 · 14 citations
Dusk over the sea between two cliffs drawn in fine vertical lines