Connecting Large Language Models with Evolutionary Algorithms Yields
  Powerful Prompt Optimizers
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.
6507a909557a87f111e6404e
Qingyan Guo
claimed_verified
2023-09-18T09:48:44.131Z
6402b31e06c715b934053d6a
https://cdn-avatars.huggingface.co/v1/production/uploads/6402b31e06c715b934053d6a/g7qGSUWaKQh6-2RLNWPIu.jpeg
guo qingyan
user
qingyan
6507a909557a87f111e6404f
Rui Wang
6507a909557a87f111e64050
Junliang Guo
6507a909557a87f111e64051
Bei Li
admin_assigned
2023-09-18T09:54:51.213Z
6306decacfbde33ef7df160b
https://cdn-avatars.huggingface.co/v1/production/uploads/1661394612620-noauth.jpeg
Bei Li
user
libeineu
6507a909557a87f111e64052
Kaitao Song
admin_assigned
2023-09-18T09:54:58.211Z
5fc0b2b61160c47d1d438568
/avatars/b355912b0ec683e73f21c8d36620e146.svg
Kaitao Song
user
KaitaoSong
6507a909557a87f111e64053
Xu Tan
admin_assigned
2023-09-18T09:55:12.262Z
5f1040b6e9d71719e3be71d2
/avatars/a2f28940236ae625ed3810ad62e343ff.svg
Xu Tan
user
xutan
6507a909557a87f111e64054
Guoqing Liu
admin_assigned
2023-09-18T09:55:20.227Z
645b6441f6ce7202d774ba10
https://cdn-avatars.huggingface.co/v1/production/uploads/noauth/U6kC2rPOqDWGPcPTovmkE.png
guoqing liu
user
liuguoqing
6507a909557a87f111e64055
Jiang Bian
admin_assigned
2023-09-18T09:56:03.608Z
63f253f8f4e30ffd2bd308fb
/avatars/303f4c7ee588f638acf78a7966786e1e.svg
Jiang Bian
user
bianjiang
6507a909557a87f111e64056
Yujiu Yang
admin_assigned
2023-09-18T09:56:11.293Z
64ca1fe838837b12d5e529b7
/avatars/44a3ad9e59318784ac531993b5f69f6b.svg
Yujiu Yang
user
Thu-redrobot
Connecting Large Language Models with Evolutionary Algorithms Yields
  Powerful Prompt Optimizers
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.
EvoPrompt, a framework using evolutionary algorithms, automates prompt optimization for large language models, achieving better performance than human-engineered prompts.
EvoPrompt evolutionary algorithms discrete prompt optimization large language models LLMs GPT-3.5 Alpaca language understanding language generation automatic prompt generation