PART 5 · Harness & Self-Improvement
Evolutionary Search: Letting the Fittest Harness Survive
Evolutionary algorithms + coding Agents = automatically discovering optimal solutions in the vast Harness design space.
Why Evolutionary Search Suits Harness Optimization
Plain talk: Evolutionary search is the same trick nature uses to selectively breed crops: plant a lot, keep what grows well, discard what doesn't, occasionally crossbreed and mutate, and over generations the crops keep improving. Why use this? Because a Harness is a mashup of prompts, code, and configs — there's no formula to calculate the optimal solution (in technical terms: gradients are unavailable), but it's easy to compare which one performs better. When you can score but can't solve, "raise a population and keep the fittest" is the right approach.
Three Key Conditions for Fit
1. Large, irregularly-shaped search space: Harness components include natural-language prompts, code logic, and tool configs — combinatorially explosive and highly discrete.
2. No gradients, but easy to evaluate: you can't differentiate through prompt text, but you can directly run benchmarks and get a score.
3. Diversity has value: different tasks may call for different Harness styles; evolution naturally maintains population diversity.
2. No gradients, but easy to evaluate: you can't differentiate through prompt text, but you can directly run benchmarks and get a score.
3. Diversity has value: different tasks may call for different Harness styles; evolution naturally maintains population diversity.
Pioneers of Prompt Evolution
Promptbreeder & GEPA
Promptbreeder (Fernando et al. 2023): evolves task-specific prompts using rich mutation operators. Key innovation: the mutation prompts themselves are also improved through evolution, creating meta-evolution.
GEPA (Agrawal et al. 2025): combines reflection-based prompting with evolutionary search. The Agent first reflects on the current prompt's weaknesses, then produces candidate improvements via evolutionary operators, and finally selects the best one.
These two works laid the foundation for later, larger-scale Harness evolution.
GEPA (Agrawal et al. 2025): combines reflection-based prompting with evolutionary search. The Agent first reflects on the current prompt's weaknesses, then produces candidate improvements via evolutionary operators, and finally selects the best one.
These two works laid the foundation for later, larger-scale Harness evolution.
AlphaEvolve: Evolutionary Search for Coding Agents
Plain talk: AlphaEvolve applies the "selective breeding" approach above to program code: maintain a code farm (pool of candidate programs), have the AI propose edits (generate diffs) to the best-performing code each round, run scores after editing, and keep the high scorers to reproduce. Google used it to genuinely discover faster matrix multiplication algorithms than anything known to humans: the crops produced a new variety.
AlphaEvolve (Novikov et al. 2025)
Core idea: maintain a candidate program pool, use a frozen LLM to generate code diffs to improve programs, repeatedly evaluate sub-programs and keep the best-performing ones.
Novikov et al. "AlphaEvolve: A coding agent for scientific and algorithmic discovery." 2025.
AlphaEvolve system architecture: candidate program pool → LLM generates diffs → evaluation → survival of the fittest.
Prompt Design
Parent program + evaluation results + instructions + meta-info together form the evolution prompt
Evolution Tags
Use # EVOLVE-BLOCK-START / # EVOLVE-BLOCK-END to explicitly mark improvable regions
Meta-prompt
Instructions and context themselves participate in co-evolution and are not fixed
Ablation Study
Proves that the evolutionary pipeline, context prompt, meta-prompt, full-file evolution, and stronger LLM each contribute independently
AlphaEvolve ablation study: the contribution of each component to final performance.
Darwin Gödel Machine (DGM)
Plain talk: DGM is more radical than AlphaEvolve: the object of evolution is the Agent's own "operating system" (its own harness code), going beyond editing others' code. Imagine a group of robots, each able to review their own exam mistakes and then physically modify their own brain circuitry — the robots that improve most effectively survive to produce offspring. That's what "Darwin" in the name means: natural selection, the strongest self-modification survives.
DGM (Zhang et al. 2025)
Unlike AlphaEvolve, DGM explicitly targets editable harness code repositories for evolution: the Agent is allowed to modify its own harness code.
Zhang et al. "The Darwin Gödel Machine: Open-Ended Evolution of Self-Improving Agents." 2025.
- Initialize: start with one coding agent from the pool
- Select parent: probabilistically select a parent based on performance (probability inversely proportional to offspring count, encouraging exploration)
- Reflect + propose: the parent agent reviews its own benchmark evaluation logs and proposes harness improvements
- Mutate: modify the harness code to produce a new agent
- Evaluate: the new agent is evaluated on benchmarks; only agents with sufficiently high performance are added back to the pool
- Repeat: loop until the stopping condition is met
DGM Tools & Experimental Results
Toolset: bash + editor (view / create / edit)
Experiments (based on Claude 3.5 Sonnet):
· SWE-bench Verified: 20% → 50% (+30 pp)
· Polyglot: 14.2% → 30.7% (+16.5 pp)
No human intervention required; the Agent autonomously evolved a stronger harness design.
Experiments (based on Claude 3.5 Sonnet):
· SWE-bench Verified: 20% → 50% (+30 pp)
· Polyglot: 14.2% → 30.7% (+16.5 pp)
No human intervention required; the Agent autonomously evolved a stronger harness design.
Applicability and Limitations
Suitable scenarios
- Candidate solutions can be evaluated automatically
- Fitness is easy to quantify (numerical metrics)
- Matrix multiplication acceleration
- GPU kernel optimization
- Competitive programming
- Datacenter scheduling
Unsuitable scenarios
- Slow evaluation (hours per run)
- Vague or subjective evaluation criteria
- Primarily heuristic-based judgment
- Limited compute budget
- Requires human review steps
Efficiency Considerations
The compute overhead of evolutionary search is non-trivial. Both AlphaEvolve and DGM require many evaluation rounds, each involving LLM inference + code execution + benchmarking. The trade-off between computational efficiency (how many evaluations per generation) and evolutionary effectiveness (how much improvement per generation) remains an open question.
Joint Optimization: Model Weights + Harness
Plain talk: All the methods above only change the workflow without touching the AI's brain (model weights). SIA wants to change both at once: optimize the workflow and retrain the brain simultaneously. Sounds great, but the risks are also higher: it's like modifying a race car's engine and the track at the same time — both changing simultaneously is hard to control (this is the training stability problem mentioned in the paper).
SIA (Hebbar et al. 2026)
SIA puts harness improvement and model parameter updates into the same optimization loop:
· Meta-Agent: proposes new harness designs
· Task-Specific Agent: executes tasks under the new harness
· Feedback-Agent: decides whether to update the harness or the model weights based on results
Promising direction, but evidence is preliminary: training stability and the Goodhart effect (optimizing proxy metrics causes real-goal degradation) remain open challenges.
· Meta-Agent: proposes new harness designs
· Task-Specific Agent: executes tasks under the new harness
· Feedback-Agent: decides whether to update the harness or the model weights based on results
Promising direction, but evidence is preliminary: training stability and the Goodhart effect (optimizing proxy metrics causes real-goal degradation) remain open challenges.
Hebbar et al. "Self-Improving Agents." 2026.
SIA architecture: Meta-Agent proposes harness → Task Agent executes → Feedback Agent decides optimization direction.
Key insight: when the search space is large, gradients are unavailable, but evaluation is easy, evolutionary search is the natural choice for optimizing Harnesses. From Promptbreeder's prompt evolution, to AlphaEvolve's program evolution, to DGM's harness code self-rewriting — evolutionary pressure is letting the strongest Agents survive. The future SIA direction attempts to co-evolve harness and model weights, but stability challenges remain unsolved.