What belongs in a prompt
The system prompt is the System prompt box in the Behaviour panel on the Configure tab, below the name and the first message. Duvi sends it with every exchange, so every sentence in it is billed on every turn of every conversation for as long as the agent runs. A four hundred word prompt on a busy agent is a recurring cost.
Facts in a prompt also behave badly. You cannot update them without editing the agent, they arrive with no source attached, and they compete with the passages retrieval found. An agent holding two prices, one in the prompt and one in knowledge, will sometimes quote the wrong one, and the trace cannot tell you why.
| Belongs in knowledge | Belongs in the prompt |
|---|---|
| The Pro plan includes ten seats. | Never quote a price that is not in the price list. |
| Returns are accepted within 30 days. | If you cannot find a policy, say so and offer a handover. |
| The Mumbai office opens at 9am. | Answer in the language the customer wrote in. |
The six blocks of a prompt
Write the prompt as six short sections, each answering one question, in this order.
| Block | Answers | Example line |
|---|---|---|
| Identity | Who is speaking | You are the assistant on the Northwind website. |
| Situation | Where, and to whom | Most visitors arrive from the pricing page. |
| Voice | How it sounds | Two sentences at a time. Never say “as an AI”. |
| Job | What it is for, in order | Answer from knowledge. If you cannot, take a name and email. |
| Boundaries | What it must never do | Never quote a price that is not in the price list. |
| Tools | When to call what | Call lookup_order only after you have an order id. |
Why block order matters
Identity and Situation are stable, so they sit first and stay put. Job and Boundaries change as you learn what customers ask, so they sit lower, where editing them disturbs less of the prompt.
Use headings. A prompt broken into six labelled sections is read more reliably than the same words as prose, because the labels tell the model which sentences are rules and which are context.
Give every rule a reason
A bare prohibition is followed narrowly. The same prohibition with its reason attached generalises to cases you never wrote down.
| Rule alone | Rule with its reason |
|---|---|
| Never use ellipses. | Your reply is read aloud by a speech engine, so never use ellipses. The engine does not know how to pronounce them. |
Applied to the boundary above, never quote a price that is not in the price list, because a wrong price is a commitment we then have to honour or retract also stops the agent estimating, rounding, or offering a range. The bare version stops only the literal case.
Add two or three examples
Examples steer tone and shape more reliably than adjectives. Writing be concise and friendly is vague. Showing one concise, friendly answer is not. Wrap examples in tags so the model does not read them as instructions.
<examples>
<example>
Customer: do you do anything for small teams
You: Yes. The Starter plan covers up to five people.
Want me to walk you through what it includes?
</example>
<example>
Customer: whats your uptime SLA
You: I do not have an SLA figure in what I can see, so I
do not want to guess. Can I take your email and have
someone send you the real number?
</example>
</examples>Prompts for voice agents
When an agent chat mode is voice or both, a speech engine reads everything it writes. Four rules apply.
- Cap the reply length in the prompt. Two or three sentences unless the customer asked for detail, and one question at a time. A long answer is skimmed on a screen and cannot be skimmed on a call.
- Spell out symbols. Digits and characters such as
@and%are a common source of mispronunciation. Tell the agent to say “forty two dollars and fifty cents” rather than emit$42.50. - Keep tool arguments machine shaped. If a tool takes an email, the argument must be
rita@example.com, not “rita at example dot com”. State that in the Tools block and give the format as an example. - Ban markdown. Bullets, bold and links read as nothing aloud. If the agent runs on both surfaces, tell it to structure answers with sentences rather than syntax.
The first message is a separate field in the same panel. The agent speaks or shows it before the customer says anything, so it carries the offer and the invitation to interrupt. Keep it under two sentences. The disclaimer is a third field, covered in AI disclaimer.
What never belongs in a prompt
- Secrets. No API keys, no internal URLs, no pricing floors you would not say to a customer. Keys belong in stored keys, where Duvi encrypts them and never shows them again.
- Facts that change. They belong in knowledge, where they arrive with a source attached and can be traced.
- Instructions the agent cannot act on. Telling it to check the CRM when no tool reaches the CRM produces an agent that claims it checked. If there is no tool, there is no instruction.
Example system prompt
Six blocks, roughly two hundred words, for a support agent with an order lookup tool connected.
# Identity
You are the assistant on the Northwind website. You are not a
person and you say so if asked.
# Situation
Most visitors are existing customers checking an order or a
return. A few are deciding whether to buy.
# Voice
Two or three sentences at a time. Plain English, no jargon, no
markdown. Your reply is read aloud, so write numbers as words
and never use ellipses.
# Job
1. Answer from the knowledge you were given.
2. For an order question, verify the customer, then call
lookup_order.
3. If you cannot answer, say so plainly and offer to take a
name and email.
4. Log what you could not answer rather than guessing.
# Boundaries
Never quote a price, delivery date or policy that is not in your
knowledge, because a wrong one becomes a promise we have to
honour. Never claim to have checked a system you did not call.
Hand over whenever the customer asks, whenever you have failed
twice in a row, or whenever the customer is upset.
# Tools
lookup_order needs an order id and the email on the account. The
email must be in the form rita@example.com, not spoken out. If it
returns nothing, say the order was not found and offer a handover
rather than trying a second time.Every boundary in that prompt carries its reason, which is what keeps a prompt holding at conversation four hundred.
Test the prompt
A prompt is a hypothesis. Both OpenAI and Google describe prompting as test driven and iterative rather than something you get right by writing carefully. Duvi gives you two instruments.
- Preview runs the agent as a customer meets it. Ask the five questions you know the answer to, and one you know it cannot answer.
- The retrieval trace tells you whether a bad answer was a prompt problem or a knowledge problem. If the right passage was retrieved and the answer was still wrong, the prompt is at fault. If the passage never arrived, editing the prompt will not fix it.
Run the trace first. Most people rewrite the prompt when the real fault was a page that was never indexed.
Sources
The guidance on this page is drawn from five published references. Where they disagree, this page says so rather than averaging them.