title: Connecting Large Language Models with Evolutionary Algorithms Yields
    Powerful Prompt Optimizers
summary: Large Language Models (LLMs) excel in various tasks, but they rely on
  carefully crafted prompts that often demand substantial human effort. To
  automate this process, in this paper, we propose a novel framework for discrete
  prompt optimization, called EvoPrompt, which borrows the idea of evolutionary
  algorithms (EAs) as they exhibit good performance and fast convergence. To
  enable EAs to work on discrete prompts, which are natural language expressions
  that need to be coherent and human-readable, we connect LLMs with EAs. This
  approach allows us to simultaneously leverage the powerful language processing
  capabilities of LLMs and the efficient optimization performance of EAs.
  Specifically, abstaining from any gradients or parameters, EvoPrompt starts
  from a population of prompts and iteratively generates new prompts with LLMs
  based on the evolutionary operators, improving the population based on the
  development set. We optimize prompts for both closed- and open-source LLMs
  including GPT-3.5 and Alpaca, on 9 datasets spanning language understanding and
  generation tasks. EvoPrompt significantly outperforms human-engineered prompts
  and existing methods for automatic prompt generation by up to 25% and 14%
  respectively. Furthermore, EvoPrompt demonstrates that connecting LLMs with EAs
  creates synergies, which could inspire further research on the combination of
  LLMs and conventional algorithms.
paper_authors._id: 6507a909557a87f111e6404e
paper_authors.name: Qingyan Guo
paper_authors.status: claimed_verified
paper_authors.statusLastChangedAt: 2023-09-18T09:48:44.131Z
paper_authors._id: 6402b31e06c715b934053d6a
paper_authors.avatarUrl: https://cdn-avatars.huggingface.co/v1/production/uploads/6402b31e06c715b934053d6a/g7qGSUWaKQh6-2RLNWPIu.jpeg
paper_authors.fullname: guo qingyan
paper_authors.type: user
paper_authors.user: qingyan
paper_authors._id: 6507a909557a87f111e6404f
paper_authors.name: Rui Wang
paper_authors._id: 6507a909557a87f111e64050
paper_authors.name: Junliang Guo
paper_authors._id: 6507a909557a87f111e64051
paper_authors.name: Bei Li
paper_authors.status: admin_assigned
paper_authors.statusLastChangedAt: 2023-09-18T09:54:51.213Z
paper_authors._id: 6306decacfbde33ef7df160b
paper_authors.avatarUrl: https://cdn-avatars.huggingface.co/v1/production/uploads/1661394612620-noauth.jpeg
paper_authors.fullname: Bei Li
paper_authors.type: user
paper_authors.user: libeineu
paper_authors._id: 6507a909557a87f111e64052
paper_authors.name: Kaitao Song
paper_authors.status: admin_assigned
paper_authors.statusLastChangedAt: 2023-09-18T09:54:58.211Z
paper_authors._id: 5fc0b2b61160c47d1d438568
paper_authors.avatarUrl: /avatars/90beea6b452c662d579197dbf592423a.svg
paper_authors.fullname: Kaitao Song
paper_authors.type: user
paper_authors.user: KaitaoSong
paper_authors._id: 6507a909557a87f111e64053
paper_authors.name: Xu Tan
paper_authors.status: admin_assigned
paper_authors.statusLastChangedAt: 2023-09-18T09:55:12.262Z
paper_authors._id: 5f1040b6e9d71719e3be71d2
paper_authors.avatarUrl: /avatars/a2f28940236ae625ed3810ad62e343ff.svg
paper_authors.fullname: Xu Tan
paper_authors.type: user
paper_authors.user: xutan
paper_authors._id: 6507a909557a87f111e64054
paper_authors.name: Guoqing Liu
paper_authors.status: admin_assigned
paper_authors.statusLastChangedAt: 2023-09-18T09:55:20.227Z
paper_authors._id: 645b6441f6ce7202d774ba10
paper_authors.avatarUrl: https://cdn-avatars.huggingface.co/v1/production/uploads/noauth/U6kC2rPOqDWGPcPTovmkE.png
paper_authors.fullname: guoqing liu
paper_authors.type: user
paper_authors.user: liuguoqing
paper_authors._id: 6507a909557a87f111e64055
paper_authors.name: Jiang Bian
paper_authors.status: admin_assigned
paper_authors.statusLastChangedAt: 2023-09-18T09:56:03.608Z
paper_authors._id: 63f253f8f4e30ffd2bd308fb
paper_authors.avatarUrl: /avatars/303f4c7ee588f638acf78a7966786e1e.svg
paper_authors.fullname: Jiang Bian
paper_authors.type: user
paper_authors.user: bianjiang
paper_authors._id: 6507a909557a87f111e64056
paper_authors.name: Yujiu Yang
paper_authors.status: admin_assigned
paper_authors.statusLastChangedAt: 2023-09-18T09:56:11.293Z
paper_authors._id: 64ca1fe838837b12d5e529b7
paper_authors.avatarUrl: /avatars/44a3ad9e59318784ac531993b5f69f6b.svg
paper_authors.fullname: Yujiu Yang
paper_authors.type: user
paper_authors.user: Thu-redrobot
paper_title: Connecting Large Language Models with Evolutionary Algorithms Yields
    Powerful Prompt Optimizers
paper_summary: Large Language Models (LLMs) excel in various tasks, but they rely on
  carefully crafted prompts that often demand substantial human effort. To
  automate this process, in this paper, we propose a novel framework for discrete
  prompt optimization, called EvoPrompt, which borrows the idea of evolutionary
  algorithms (EAs) as they exhibit good performance and fast convergence. To
  enable EAs to work on discrete prompts, which are natural language expressions
  that need to be coherent and human-readable, we connect LLMs with EAs. This
  approach allows us to simultaneously leverage the powerful language processing
  capabilities of LLMs and the efficient optimization performance of EAs.
  Specifically, abstaining from any gradients or parameters, EvoPrompt starts
  from a population of prompts and iteratively generates new prompts with LLMs
  based on the evolutionary operators, improving the population based on the
  development set. We optimize prompts for both closed- and open-source LLMs
  including GPT-3.5 and Alpaca, on 9 datasets spanning language understanding and
  generation tasks. EvoPrompt significantly outperforms human-engineered prompts
  and existing methods for automatic prompt generation by up to 25% and 14%
  respectively. Furthermore, EvoPrompt demonstrates that connecting LLMs with EAs
  creates synergies, which could inspire further research on the combination of
  LLMs and conventional algorithms.
paper_ai_keywords: Large Language Models (LLMs) EvoPrompt evolutionary algorithms (EAs) discrete prompts natural language expressions language processing capabilities evolutionary operators development set closed-source LLMs open-source LLMs GPT-3.5 Alpaca language understanding tasks language generation tasks human-engineered prompts automatic prompt generation