title: Large Language Models as Optimizers
summary: 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 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.
paper_authors._id: 64fa7df1dcc5ce730e443fa0
paper_authors.name: Chengrun Yang
paper_authors.status: claimed_verified
paper_authors.statusLastChangedAt: 2023-09-09T05:38:16.308Z
paper_authors._id: 64fbab29e0dc35986bac8e03
paper_authors.avatarUrl: /avatars/7c11abfac56a06c1122750332c40d189.svg
paper_authors.fullname: Chengrun Yang
paper_authors.type: user
paper_authors.user: chengrun
paper_authors._id: 64fa7df1dcc5ce730e443fa1
paper_authors.name: Xuezhi Wang
paper_authors._id: 64fa7df1dcc5ce730e443fa2
paper_authors.name: Yifeng Lu
paper_authors.status: admin_assigned
paper_authors.statusLastChangedAt: 2023-09-08T10:04:42.501Z
paper_authors._id: 6344a8050f69ad8aa61cb663
paper_authors.avatarUrl: /avatars/ed637f510d18ccd1f4bdd6861d5c858e.svg
paper_authors.fullname: Yifeng Lu
paper_authors.type: user
paper_authors.user: yifenglu
paper_authors._id: 64fa7df1dcc5ce730e443fa3
paper_authors.name: Hanxiao Liu
paper_authors._id: 64fa7df1dcc5ce730e443fa4
paper_authors.name: Quoc V. Le
paper_authors._id: 64fa7df1dcc5ce730e443fa5
paper_authors.name: Denny Zhou
paper_authors.status: claimed_verified
paper_authors.statusLastChangedAt: 2024-02-20T18:28:19.081Z
paper_authors._id: 65d4d62d493aeaf0bb295f1b
paper_authors.avatarUrl: https://cdn-avatars.huggingface.co/v1/production/uploads/noauth/vXMxaoWwFziul8TqIhQw8.jpeg
paper_authors.fullname: Denny Zhou
paper_authors.type: user
paper_authors.user: dennyzhou
paper_authors._id: 64fa7df1dcc5ce730e443fa6
paper_authors.name: Xinyun Chen
paper_authors.status: admin_assigned
paper_authors.statusLastChangedAt: 2023-09-08T13:11:40.793Z
paper_authors._id: 64d0268001931c60161e026a
paper_authors.avatarUrl: /avatars/0ea48c47b0270b449fd6b97b495e64a6.svg
paper_authors.fullname: Xinyun Chen
paper_authors.type: user
paper_authors.user: xinyunchen
paper_title: Large Language Models as Optimizers
paper_summary: 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 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.
paper_ai_summary: OPRO, a method using large language models to optimize tasks described in natural language, outperforms human-designed prompts on various benchmark datasets.
paper_ai_keywords: derivative-based algorithms Optimization by PROmpting (OPRO) large language models (LLMs) natural language linear regression traveling salesman problems prompt optimization GSM8K Big-Bench Hard tasks