TL;DR: MIPROv2 searches combinations of instructions and few-shot demonstrations: it bootstraps candidate demonstrations from runs that score well, proposes instructions with a model, and picks combinations with Bayesian optimisation. GEPA evolves prompt text by reflecting on execution traces and the metric's feedback, keeping a Pareto set of candidates that win on different examples. Use one when a step is stable, you have a trustworthy metric and enough representative examples, and hand-tuning has plateaued; validate on a held-out set.
How to approach it
Describe the search space and the search method for each, then the inputs both need, then when it pays off and how to check it did.
A strong answer
The search space. For each step of a program: the instruction text and the set of examples shown to the model. Not the model's weights, not the program's structure.
MIPROv2. Three stages: run the program on training examples and keep traces that score well as candidate demonstrations; have a model propose instruction variants; search combinations over many trials with Bayesian optimisation, scoring each on the metric.
GEPA. Runs the program, collects traces and the metric's text feedback, asks a model to reflect on failures and propose revised prompt text, and keeps candidates that are best on some validation examples (a Pareto front) so different strategies survive. Its paper (2025) reports it outperforming reinforcement learning baselines on its tasks; treat that as a result on those tasks.
What both need. A program with separable steps, a metric that measures the real goal (with feedback for GEPA), a training set and a held-out set drawn from real traffic.
When to use one. The step is stable and frequent; quality matters enough to justify the runs; you have a few dozen to a few hundred representative examples; manual edits stopped helping.
When not to. No trustworthy metric (it will optimise the wrong thing), tiny or unrepresentative data (it will overfit), or the real problem is a tool or context issue the prompt cannot fix.
Check it worked. Compare held-out scores with the baseline over repeated runs; re-run when the model changes.
What interviewers probe next
"Versus fine-tuning?" Prompt optimisation is cheaper, reversible and model-agnostic per run; fine-tuning changes weights and needs a maintained model.
"Versus RL?" RL needs a verifiable reward and environments; prompt optimisation needs a metric and examples. Try the cheaper one first.
How it's scored
Weak: "It makes prompts better automatically."
Hire: Describes the search space and the need for a metric and data.
Strong Hire: Explains both search methods, the inputs, when each pays off and when not, held-out validation with repeated runs, and re-validation on model change.
Common mistakes
- Optimising against a metric that rewards format over correctness.
- No held-out set.
- Expecting prompt search to fix a tool contract.