Anyone who has run a prompt optimizer over a multi-agent pipeline has felt this failure: a tweak that clearly improves an agent’s answers also breaks the run, because the same prompt that generates content also carries the routing rules, output schema, and termination signal the surrounding code depends on. This paper names the problem cleanly — the prompt is doing two jobs, and the optimizer can’t tell them apart.
- 🎯 Two roles, one string: task content is unstructured language; execution protocol (routing, formatting, stop conditions) is structured — and prompt optimizers happily drift the second while improving the first.
- 🔍 The split that fixes it: represent control as typed, validated program objects and leave only the task language as the optimizable data flow, so the interface the code relies on never gets exposed to the optimizer.
- ✅ The result that matters: 100% eventual protocol validity across synthetic reasoning, collaborative review, and insurance-rating workflows — while task performance still climbs.
- ⚡ Why it’s more than plumbing: this is the gap between a prompt optimizer you can run unattended and one you have to babysit for pipeline breakage after every round.
- 💡 Where I’d apply it: any agent graph where a formatting or routing token is load-bearing — which, in production, is most of them.
The HF paper page frames this as prompt optimization, but the deeper move is treating agent orchestration like a type system: contracts the optimizer isn’t allowed to touch, content it is. If your multi-agent framework still smuggles control flow through free-text prompts, how many of your “the model regressed” incidents were actually the optimizer editing your routing by accident?