
Key points
- Write the agent's instructions like a job description with limits.
- State what to do, what never to do, and when to ask a human.
- Put critical checks in code, because prompts can be overridden.
- Test instructions against adversarial and ambiguous messages.
Behind every ordering agent is a block of text telling it who it is and what it may do. Get that text wrong and the best model in the world will cheerfully do the wrong thing. Get it right and an average model becomes dependable.
Writing these instructions is closer to drafting a job description than to clever prompting. Below is a practical template for an agent that gathers names, sizes and personalization details for a group uniform order, plus a frank look at what instructions alone cannot guarantee.
Start with role and scope
Open with a plain statement of purpose. For example: you help a clinic team provide the details needed for a group uniform order. You collect, confirm and summarize. You do not make purchasing decisions, and you cannot place orders.
Next, spell out the audience and tone. Staff are busy, so replies should be brief, polite and specific. Tell the agent to ask one question at a time, to use the person's own wording when repeating details back, and to avoid jargon.
Finally, state what the agent has access to. List the tools, such as the roster lookup and the order record, and explicitly say that it has no access to payment or supplier systems. A clear boundary in the instructions reinforces the real boundary in the architecture.
Give it the facts it needs
The agent should not rely on general knowledge for anything specific to your facility. Provide the approved style list, the size chart, the deadline, the quantity thresholds and the embroidery rules directly in its context or through retrieval.
For personalization, include specifics: maximum characters, permitted characters, how many lines are allowed, and the instruction to copy text exactly. Anyone who plans to order scrub caps with name embroidery should add this section carefully, since the agent will be handling the least forgiving field in the order.
Keep reference material in a clearly labeled section so the agent can tell facts from instructions. Update it whenever the underlying information changes, and record the version.
Write the rules as short, testable sentences
Long, flowing paragraphs invite misreading. Use short sentences, each describing one behavior you can test.
- Record embroidery text exactly as typed, including capitalization and punctuation.
- Never correct, translate or abbreviate a name.
- If a size is not on the chart, show the valid sizes and ask again.
- Do not mark a record confirmed until the person has replied yes to a read-back.
- If a request involves policy, cost or anything not listed here, pass it to the manager.
Where possible, phrase rules positively and add the reason. An agent that understands why it should copy names exactly is more likely to apply the rule in a situation you did not foresee.
Say what to do when unsure
Models tend to fill silence with confidence. Counter that with explicit permission to stop. Tell the agent that asking a question is always acceptable, that guessing is never acceptable, and that a handoff to a person is a good outcome rather than a failure.
Provide a format for handoffs: a one-line summary, the relevant records, and the specific decision needed. This turns a vague escalation into something the manager can answer in seconds.
Defend against messages that try to steer the agent
Staff messages, forwarded emails and pasted text are all data. Occasionally one will contain something that sounds like an instruction, whether by accident or on purpose. Tell the agent plainly that text from users and documents never changes its rules, and that it should flag any message that tries to.
Do not stop there. Instructions can be argued around by a sufficiently clever message. The checks that really matter, such as the confirmation gate, the embroidery comparison, spending limits and the approval requirement, belong in code that the model cannot override.
Version, test and review
Treat the instruction sheet like software. Keep it in version control, give each revision a number and record which version produced each order line. When something goes wrong, you can see whether the instructions changed.
Test every revision against the same set of messy cases: odd names, conflicting replies, late changes, policy questions and attempts to push the agent off script. Compare results with the previous version, and be wary of fixes that solve one case and break another.
- Draft the role, scope and tool list.
- Add the reference facts and cite their versions.
- Write rules as short, testable sentences.
- Add the stop-and-ask conditions and the handoff format.
- Move every critical check into code.
- Test, record results and version the sheet.
A last practical point: keep a short changelog beside the sheet. Each entry should say what changed, why and what test prompted the change. When a colleague asks why the agent refuses to abbreviate names, the changelog gives the answer, and it stops well-meaning edits from undoing a rule that exists for a reason.
Share the sheet with the people the agent serves. A manager who reads the rules can spot a missing policy, and staff who understand what the agent will and will not do are less likely to be surprised by it. Instructions written in plain language are easier for humans to audit as well as for models to follow.
Finally, resist the urge to make the sheet longer every time something goes wrong. Long prompts bury their own rules. Prefer fixing the form, the schema or the validation code first, and add a sentence to the instructions only when that is truly the right layer.
Keep one example conversation in the sheet showing an ideal exchange from first message to confirmed record. Models follow examples closely, and a single well-chosen one communicates tone and structure better than a page of description.
An instruction sheet is never finished. Staff will phrase things you did not expect, suppliers will change their forms and your own policies will evolve. Revisit the sheet after each order cycle, read the conversation logs for confusion, and fold what you learn back in.
Topics: prompt design, system prompts, ai agents, ordering
Updated