Prompt Design
Well-written prompts define how your agent behaves throughout a conversation. Keep prompts structured, specific, and limited to the scope where their instructions apply.
Global Prompt
The global prompt contains instructions that apply throughout the entire conversation and across all pathway nodes.
Use the global prompt for:
The agent’s identity and general purpose
Personality and tone
Preferred terminology and word usage
Language behavior
General business or safety rules
Fallback behavior for unrelated topics
Instructions that should apply consistently across the whole pathway
Avoid repeating global instructions inside every node prompt.
Global prompt example
You are Noor, a calm and professional medical intake agent for Al-Razi.
Use clear and simple language.
Be patient when asking the user to repeat information.
Use the term "appointment" instead of "booking".
If the user asks about an unrelated topic, politely explain that you can only assist with medical intake and appointments.
When Arabic words form the primary sentence structure, respond in Arabic, even when English technical terms are present.
When English words form the primary sentence structure, respond in English, even when Arabic names or a few Arabic words are present.Node Prompts
A node prompt defines what the agent must do at one specific step in the pathway.
Treat each node prompt as a small contract. Clearly define:
The context of the current step
The input variables available to the node
The task the agent must complete
The rules it must follow
What to do when information is missing or unclear
Keep node prompts focused. Do not repeat the full agent personality or general instructions already included in the global prompt.
Node prompt example
Variable Templating
Use variables to insert information collected earlier in the pathway or provided when the call starts.
Write a variable using the following format:
VoiceHub replaces the placeholder with the variable's current value before the prompt is processed.
Use clear and descriptive variable names. Whenever possible, write the variable name before its placeholder and include a type or unit when it helps prevent confusion.
Avoid vague variable names such as:
Example before variable replacement
Available variable values
Prompt after variable replacement
The agent now receives the real values instead of the variable placeholders.
Handling Missing Variables
Always define what the agent should do when required information is unavailable.
A variable may be missing, empty, or null. The agent must not guess or infer its value from unrelated context.
Recommended behavior
For nodes that return structured values for routing or later processing, use one predictable fallback value:
For conversational nodes, use a natural fallback:
Keep Node Responsibilities Separate
Do not place voice instructions or pathway-routing instructions inside node prompts.
Do not add voice instructions to node prompts
Avoid instructions such as:
Configure voice selection and voice behavior in the relevant voice settings instead of the node prompt.
A node prompt may describe the conversational tone when it is specific to the current step, but it should not attempt to control the technical voice configuration.
Do not add edge-selection instructions to node prompts
Avoid instructions such as:
Configure routing and transition conditions using Pathway Edges.
The node prompt should describe only the task:
The connected edges should determine what happens next based on the user's response.
Recommended Prompt Structure
The following structure works well for most node prompts:
Not every prompt needs every section. Include only the sections that help make the node's responsibility clear.
Complete Example
Global prompt
Node prompt before replacement
Variable values
Node prompt after replacement
A suitable response would be:
Best Practices
Use short sections instead of long paragraphs.
Write direct and specific instructions.
Keep global behavior in the global prompt.
Keep each node focused on one conversation step.
List input variables explicitly.
Use descriptive variable names.
Define what happens when information is missing.
Do not allow the agent to guess sensitive or account-specific information.
Keep routing instructions in Pathway Edges.
Keep technical voice configuration out of node prompts.
Test prompts using complete, missing, and unclear variable values.
Last updated