Papers › EvoPrompt: Connecting LLMs with Evolutionary Algorithms Yields Powerful Prompt Optimizers

EvoPrompt: Connecting LLMs with Evolutionary Algorithms Yields Powerful Prompt Optimizers

15 Sep 2023arXiv:2309.08532archive 2025-07-28

Qingyan Guo, Rui Wang, Junliang Guo, Bei Li, Kaitao Song, Xu Tan, Guoqing Liu, Jiang Bian, Yujiu Yang

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 31 datasets covering language understanding, generation tasks, as well as BIG-Bench Hard (BBH) tasks. EvoPrompt significantly outperforms human-engineered prompts and existing methods for automatic prompt generation (e.g., up to 25% on BBH). Furthermore, EvoPrompt demonstrates that connecting LLMs with EAs creates synergies, which could inspire further research on the combination of LLMs and conventional algorithms.

PaperPDFCodeCode Syntology ran

In Syntology Open this paper in Syntology's Atlas, the map of the papers in Syntology's graph and their citations.

For agents, Syntology's MCP tool lists every function and class Syntology harvested from this paper and whether it ran (how to connect): get_harvested_code_for_paper(arxiv_id="2309.08532")

Code

Syntology Ran 11 of 13 code samples harvested from 1 repository linked to this paper; 2 have no recorded run. Of those that ran: 1 ran · honoured contract; 3 ran · our draft was wrong; 1 ran · fixture could not drive it; 6 ran with no contract checked.

By repository: found in paper text by Syntology: 13 samples from 1 repository, 11 ran. The run record, sample by sample. “Ran” means executed on a synthesized input, not that the code is correct or reproduces the paper.

batorskq/prl mentioned on GitHubpytorch report
finitearth/promptolution mentioned on GitHubApache-2.0 report

Repository list and official/mentioned flags are the archive's, frozen 2025-07-28. Reachability, where shown, is from one Syntology probe window (2026-09-16 to 2026-09-18); repositories not probed show nothing. GitHub stars are not tracked.

Code Syntology ran Syntology

13 samples harvested; 11 ran; 1 honoured the contract we drafted; 2 have no recorded run. Read from Syntology's graph 2026-09-24; that is when this build read the record, not when the samples ran.

1ran · honoured contract
3ran · our draft was wrong
1ran · fixture could not drive it
6ran
2unverified

Licence: 0 of the 13 samples are pointer only, meaning Syntology does not serve that copy's text. This page shows no code text for any sample; each one links to its file in the repository.

Harvested from beeevita/EvoPrompt. “Ran” means the sample executed on a synthesized input. It does not mean the output is correct, and nothing here reproduces the paper's results. “Honoured” and “violated” refer to a contract Syntology drafted from the code itself; “our draft was wrong” and “fixture could not drive it” are failures of Syntology's instrument, not of the code.

Each sample ends with its code_sha256, Syntology's identity for that exact code. An agent fetches the stored sample with Syntology's MCP tool get_code(code_sha256="…") (how to connect); click an identity to copy that call.

Repository labels, per sample. official repository: The archive marks this repository official for the paper. named in the paper: The archive records that the paper mentions this repository; it is not marked official. community (archive-listed): In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper. found in paper text by Syntology: Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted. community: Not in the archive's code links for this paper; a community repository Syntology harvested. Samples from a repository marked official are listed first. Licence labels name the repository's licence as recorded at harvest. “Pointer only” means Syntology does not serve that copy's text, for one of four reasons: no licence file was found; the licence was not identified; the licence is recorded as permissive but that copy's record is not marked cleared; or the licence is outside the permissive list Syntology serves text under (MIT, Apache-2.0, BSD and similar). Some licences outside that list permit redistribution, such as WTFPL, and GPL-3.0 under its conditions; they are simply not on the list. Hover a licence label for the reason. File links open the file on GitHub at the default branch, which may have changed since the harvest.

batchify beeevita/EvoPrompt/evoluter.py found in paper text by Syntology ran · our draft was wrong MIT (permissive) · b330c6d185528db2 · report
evaluate_optimized_prompt beeevita/EvoPrompt/evoluter.py found in paper text by Syntology ran MIT (permissive) · f287013a24f6555f · report
extract_numbers beeevita/EvoPrompt/evoluter.py found in paper text by Syntology ran · honoured contract fingerprinted MIT (permissive) · 76fda09860d6a6ba · report
extract_seconds beeevita/EvoPrompt/evoluter.py found in paper text by Syntology ran fingerprinted MIT (permissive) · d6d67571db47df2d · report
form_request beeevita/EvoPrompt/evoluter.py found in paper text by Syntology ran fingerprinted MIT (permissive) · c160c6c484af61e4 · report
get_final_prompt beeevita/EvoPrompt/evoluter.py found in paper text by Syntology ran · our draft was wrong fingerprinted MIT (permissive) · cb966a71519c6a02 · report
k_init_pop beeevita/EvoPrompt/evoluter.py found in paper text by Syntology ran · our draft was wrong MIT (permissive) · 2d3025cc9c9fc3eb · report
llm_query beeevita/EvoPrompt/evoluter.py found in paper text by Syntology ran MIT (permissive) · 0ef65ffd26166327 · report
load_cls_data beeevita/EvoPrompt/evoluter.py found in paper text by Syntology ran MIT (permissive) · 94a4deb83a99ae36 · report
paraphrase beeevita/EvoPrompt/evoluter.py found in paper text by Syntology ran MIT (permissive) · 5db86cda527c983b · report
read_lines beeevita/EvoPrompt/evoluter.py found in paper text by Syntology ran · fixture could not drive it MIT (permissive) · 0e0098507bc5fbe9 · report
Evoluter beeevita/EvoPrompt/evoluter.py found in paper text by Syntology unverified MIT (permissive) · 57c7f6a20eb98788 · report
GAEvoluter beeevita/EvoPrompt/evoluter.py found in paper text by Syntology unverified MIT (permissive) · c8d2f9365df18753 · report

Tasks

Evolutionary Algorithms

Results from the paper archive 2025-07-28

No leaderboard rows for this paper in the archive.

Methods

AdamAttentionAttention DropoutBPECosine AnnealingDense ConnectionsDropoutGPT-3Layer NormalizationLinear LayerLinear Warmup With Cosine AnnealingMulti-Head AttentionResidual ConnectionSoftmaxWeight Decay

Report a problem or propose a change · a person checks every report against the paper or source before anything changes; decisions are listed on /corrections