← All posts

Guides

How to write a prompt your agent will actually follow

Most prompt problems are procedure problems. A practical guide to turning an SOP your team already follows into instructions an agent holds to under pressure.

Bilal Sarwar8 min read

When an agent goes off-script, the instinct is to add more instructions. Usually the real issue is that the procedure was never explicit about what to do at the branch the caller just took.

Write the decisions, not the personality

Tone takes a sentence. The bulk of a good prompt is the decision tree: what to collect, in what order, what to do when a field is missing, and when to stop and transfer.

If two people on your team would handle a call differently, the prompt is underspecified. Resolve it with them before writing it down.

Name the stopping conditions

Explicit escalation rules do more for quality than any amount of stylistic guidance. State the conditions under which the agent must hand off to a person, and it will stop trying to solve things it shouldn't.

Test against your worst calls

Replay the calls that went badly, not the ones that went well. The edge cases in your recordings are the specification.

Ready to create your first agent?