liveBook · Manning

Mutation operator

As explained in Self-Improving Agents

Mutation is an operation that makes a small change to a candidate solution in an evolutionary search.

A mutation operator creates a changed copy of a candidate during evolutionary search. For text artifacts such as prompts, mutation becomes a semantic edit written by a model. section 4.6 section 4.3.1

A blind mutation guesses at an edit; a targeted one uses a diagnosis of the run to address a named gap. Reflection supplies that diagnosis, while mutation makes the edit. With an LLM proposer, the amount of change is difficult to control or measure. section 4.2.2 section 4.3.1

Fixing a prompt from a failed run

When an agent reports wrong totals, reflection can inspect its tool-call trace and identify missing rules. Mutation then rewrites the prompt to add those rules instead of making an unguided change. section 4.2.2

Figure 4.5 A blind edit beside a reflected one. On the left, a blind proposer sees only the wrong answer and guesses; on the right, the reflector reads the whole run, the answer and the steps that led to it, works out a likely missing rule, and hands the mutation a specific target. Same model and same task, so the only difference is what the proposer was allowed to see.

Compare a blind edit with one guided by the full run and a specific diagnosis. section 4.2.2

How Self-Improving Agents covers it

How deep it goes
Defines mutation as candidate variation and demonstrates targeted prompt edits, but notes that LLM-generated edit size is hard to control.
Examples
Shows a prompt rewritten to add rules missing from an agent’s failed run.
What you can do after
Apply mutation by turning a diagnosed gap into a targeted candidate-prompt edit.
How it connects
Connects mutation to evolutionary search, selection, crossover, and reflection.

Also explained in

Compare how 3 books explain mutation operator →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Self-Improving Agents. The section links point to the parts of the book it draws on.