Stop asking one prompt to do three jobs
Adapted from the first lesson of Designing Multi-Agent Systems on Learnvoro. Originally published on Medium. Most AI workflows start as one long prompt: read this document, decide what matters, write the response. It wo
Adapted from the first lesson of Designing Multi-Agent Systems on Learnvoro. Originally published on Medium.
Most AI workflows start as one long prompt: read this document, decide what matters, write the response. It works on the easy cases. Then the edge cases arrive, and it fails in ways that are hard to spot: a summary that quietly includes a penalty the source never mentioned, or a judgment shaped by the draft the model was already writing.
The cause is the design, not the model. When one context holds competing goals (stick to the facts, make a call, write persuasively), each pulls on the others. The fix is to split the work.
One agent, one job
Give each agent a single transformation. A compliance review that used to be one prompt becomes three agents:
- An extraction agent pulls the facts of an incident out of the source into fixed fields.
- An assessment agent decides whether those facts cross a threshold, such as materiality, working only from the extracted fields.
- A drafting agent writes the response from the assessment.
The assessment agent never sees the raw document, so its tone canβt sway the decision. The extraction agent never sees the draft, so drafting canβt leak into the facts.
Write anti-goals, not personas
βYou are a meticulous legal auditorβ sounds strict and constrains almost nothing. An auditor persona will still offer advice, rewrite a sentence or fill a gap with a guess. What works is a list of things the agent must never do. For the extraction agent:
- Never state a fact the source doesnβt contain; use null when a field is missing.
- Never judge whether something matters.
- Never rewrite, summarise or soften the sourceβs wording.
- Never add a field the schema doesnβt have.
An anti-goal can be tested: you can check an output against it. A persona canβt.
Hand over a contract, not the conversation
Itβs tempting to pass each agent the whole chat so far. That costs tokens and brings back the contamination you split the work to avoid. Instead, each agent receives a fixed JSON payload and returns one:
{
"incident_date": "2026-03-14",
"systems_affected": ["billing"],
"records_exposed": 12000,
"data_types": ["email address", "postal address"],
"source_quotes": ["Unauthorised access to the billing database was detected on 14 March."]
}
Validate the payload at every handoff. If a key is missing or has the wrong type, stop there rather than letting the next agent guess.
Write the spec before the prompts
Before writing any prompt, fill in one row per agent: its role, whatβs in scope, its anti-goals, the input it accepts and the output it guarantees. The course calls this an Agent Specification Matrix. For the extraction agent:
- Role: turn the source into fixed facts.
- Scope: the source document only.
- Anti-goals: the four above.
- Input: the source text.
- Output: the JSON payload above, validated.
Most design mistakes show up here, such as two agents with the same job or an output nobody uses, while theyβre still cheap to fix.
Donβt split too far
Every handoff is another place for things to go wrong. Split where goals compete, and no further: three agents with clear contracts beat eight with blurry ones. Test each agent on its own, with fixed inputs, before you run them together.
This post was written with help from AI.
Originally published by Dev.to AI. Aggregated on AIWithGhost for educational purposes β full credit and traffic to the original publisher.

