Papers
arxiv:2309.08532

Connecting Large Language Models with Evolutionary Algorithms Yields Powerful Prompt Optimizers

Published on Sep 15, 2023
ยท Featured in Daily Papers on Sep 18, 2023
Authors:
,
,
Bei Li ,
Xu Tan ,

Abstract

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.

Community

This comment has been hidden

Friends, how can I test this technology?

Paper author

Friends, how can I test this technology?

We will release the code soon. Thanks for your attention quotes.

This comment has been hidden

Friends, how can I test this technology?

We will release the code soon. Thanks for your attention quotes.

Hello, is your code not yet released, or do you have an updated code release schedule?

Paper author

Friends, how can I test this technology?

We will release the code soon. Thanks for your attention quotes.

Hello, is your code not yet released, or do you have an updated code release schedule?

Hi, we plan to release our code in 2 weeks.

is the code available now?

Paper author

is the code available now?

The open-source of the code is on-going. We will share the link once it is available.

Paper author
โ€ข
edited Jan 18

is the code available now?

Sorry for the late release of our open-source code. You may refer to this repo temporarily (https://github.com/beeevita/EvoPrompt) since the open-source of microsoft code is still in progress. If you find it helpful to your work, please star it. Thanks a lot~~๐Ÿ˜ƒ๐Ÿ˜ƒ

Paper author
โ€ข
edited Jan 18

Friends, how can I test this technology?

We will release the code soon. Thanks for your attention quotes.

Hello, is your code not yet released, or do you have an updated code release schedule?

Sorry for the late release of our open-source code. You may refer to this repo temporarily (https://github.com/beeevita/EvoPrompt) since the open-source of microsoft code is still in progress. If you find it helpful to your work, please star it. Thanks a lot~~๐Ÿ˜ƒ๐Ÿ˜ƒ

Paper author
โ€ข
edited Jan 18

Friends, how can I test this technology?

Sorry for the late release of our open-source code. You may refer to this repo temporarily (https://github.com/beeevita/EvoPrompt) since the open-source of microsoft code is still in progress. If you find it helpful to your work, please star it. Thanks a lot~~๐Ÿ˜ƒ๐Ÿ˜ƒ

Sign up or log in to comment

Models citing this paper 0

No model linking this paper

Cite arxiv.org/abs/2309.08532 in a model README.md to link it from this page.

Datasets citing this paper 0

No dataset linking this paper

Cite arxiv.org/abs/2309.08532 in a dataset README.md to link it from this page.

Spaces citing this paper 0

No Space linking this paper

Cite arxiv.org/abs/2309.08532 in a Space README.md to link it from this page.

Collections including this paper 32