Skip to content

Prompting

Prompt writing

A good prompt gives the agent a job, a conversation flow, tool rules, fallback behavior, and boundaries. It should be specific enough to test and short enough to maintain.

If a rule cannot be tested in a real conversation, rewrite it.

A prompt is the operating manual for your agent. It should be specific enough to guide behavior, but not so long that the important instructions get lost.

The basic structure

Use this structure for most agents:

Role:
You are the voice assistant for Example Company.

Goal:
Help callers understand our services and collect the information needed for follow-up.

Conversation style:
Be friendly, concise, and professional. Ask one question at a time.

Required information:
Collect the caller's name, company, phone number, and reason for contacting us.

Knowledge usage:
Use the connected knowledge base for product and policy questions. If the answer is not available, say that you are not sure and offer follow-up.

Tool usage:
Use the SMS tool only after the caller asks for information by SMS or agrees to receive it.

Escalation:
Forward urgent sales requests to Sales during business hours. For other cases, collect details and create a follow-up.

Boundaries:
Do not invent prices, legal advice, discounts, or availability.

What good prompts do

Good prompts are:

  • clear: one instruction means one thing,
  • operational: they describe what the agent should do in real situations,
  • bounded: they say what the agent should not do,
  • testable: you can check whether the agent followed the instruction.

Common mistakes

Mistake Why it causes problems Better approach
"Be helpful." Too vague. Every agent tries to be helpful. Define exactly what help means for this workflow.
Too many rules in one paragraph Important instructions get buried. Use short sections and bullet points.
No fallback The agent may invent answers. Tell it what to do when unsure.
Tool instructions are unclear The agent may use tools too early or not at all. Define trigger, required information, and confirmation.
Changing parameters to fix a prompt issue The root cause stays hidden. Fix the prompt first, then tune parameters.

Prompting for tools

When an agent has a tool, the prompt should answer four questions:

  1. When should the tool be used?
  2. What information is required before using it?
  3. What should the agent say before using it?
  4. What should happen if the tool fails?

Example for forwarding:

If the caller asks to speak with Sales, first confirm that they want to be connected now.
Then say: "I will connect you with Sales now. Please hold for a moment."
Use the conference forwarding tool with the target "Sales".
If Sales does not answer, apologize and collect the caller's name, phone number, and message for follow-up.

Prompting for routing decisions

For Agentic Flows, routing prompts decide which agent or path should handle the conversation.

Good routing prompts:

  • define the available destinations,
  • describe when each destination should be selected,
  • include a safe fallback,
  • use only variables shown in the editor,
  • avoid hidden business logic that operators cannot verify.

Use exact target names

If a tool or route contains named targets such as Sales, Support, or Emergency, use the same names in the prompt. Do not rely on the agent guessing synonyms.

Testing prompts

After editing a prompt, test at least:

  • one ideal conversation,
  • one vague conversation,
  • one conversation with missing information,
  • one conversation where the agent must say "I don't know",
  • one conversation where a tool or forwarding action should happen,
  • one conversation where a tool or forwarding action should not happen.