Evoprompt
# EvoPrompt: Evolutionary algorithm integration
**Date**: September 15, 2023
**Institution**: Peking University, Microsoft Research Asia
## Algorithm
EvoPrompt solved discrete prompt optimization through evolutionary algorithms, connecting LLMs with Genetic Algorithms and Differential Evolution. LLMs act as evolutionary operators generating new prompt candidates while evolutionary algorithms guide the optimization process to retain optimal prompts.
Performance breakthrough: Up to 25% improvement on BBH tasks with consistent gains across 31 datasets covering language understanding, generation, and reasoning. First framework connecting LLMs with evolutionary algorithms, generating human-readable prompts without gradient or parameter access requirements.
Algorithmic approach: Iterative process starting from initial prompt populations with LLMs serving as mutation and crossover operators, balancing exploration and exploitation through evolutionary selection pressure.
## Comparison with Other Work
EvoPrompt differs from gradient-based methods like AutoPrompt by using evolutionary algorithms rather than gradient approximation. Unlike continuous methods like Prefix-Tuning and Prompt Tuning, it optimizes discrete prompts while maintaining human readability. Compared to LLM-as-optimizer methods like APE and OPRO, EvoPrompt uses population-based search rather than sequential generation. Unlike reinforcement learning methods like RLPrompt, it uses evolutionary selection rather than policy gradients. EvoPrompt is similar to genetic algorithm approaches in neural architecture search but applied specifically to prompt optimization. It requires fewer assumptions about model internals compared to gradient-based methods.when to use it
Community prompt sourced from the open-source GitHub repo sarkar-dipankar/llm-prompt-optimisation (no explicit license). A "Evoprompt" style prompt — adapt the placeholders and specifics to your task. Imported as-is and not independently retested here, so check the output before relying on it.
tags
roleplaycommunitygeneral
source
sarkar-dipankar/llm-prompt-optimisation · no explicit license