Voice AI Prompting Guide
Overview
This guide helps you write effective prompts for Voice AI assistants. Learn how to design, test, and refine prompts to get the best results from your agents. Use these strategies to improve your agent’s reliability, success rate, and user experience.
Why prompt engineering matters
Prompt engineering is the art of crafting clear, actionable instructions for AI agents. Well-designed prompts:
- Guide the AI to produce accurate, relevant, and context-sensitive outputs
- Improve the agent’s ability to handle requests without human intervention
- Increase your overall success rate
Poor prompts can lead to ambiguous or incorrect results, limiting the agent’s utility.
How to measure success
Your “success rate” is the percentage of requests your agent handles from start to finish without human intervention. The more complex your use case, the more you’ll need to experiment and iterate on your prompt to improve this rate.
The process
Follow a structured approach to prompt engineering:
Design
Craft your initial prompt, considering the specific task, context, and desired outcome. Clear and detailed prompts help guide the AI in understanding your needs.
Test
Run the prompt through the AI. Evaluate if the response aligns with your expectations and meets the intended goal. Testing helps identify potential gaps in clarity or structure.
Principles of effective prompts
Organize prompts into sections
Break down system prompts into clear sections, each focused on a specific aspect:
- Identity: Define the agent’s persona and role
- Style: Set stylistic guidelines (conciseness, tone, humor)
- Response guidelines: Specify formatting, question limits, or structure
- Task & goals: Outline objectives and steps
Example:
Break down complex tasks
For complex interactions, use step-by-step instructions and conditional logic to guide the agent’s responses.
Example:
Control response timing
Explicitly indicate when the agent should wait for the user’s response before proceeding.
Example:
Integrate tools and APIs
Specify when and how the agent should use external tools or APIs. Reference tools by their designated names and describe their functions.
Example:
Silent transfers
If the AI determines that the user needs to be transferred, do not send any text response back to the user. Instead, silently call the appropriate tool for transferring the call. This ensures a seamless user experience and avoids confusion.
Include fallback and error handling
Always include fallback options and error-handling mechanisms in your prompts. This ensures the agent can gracefully handle unexpected user inputs or system errors.
Example:
Additional tips
- Iterate as much as possible. AI is driven by experimentation and iteration—refining prompts through trial and error will help you achieve more precise, relevant, and effective responses.
- Use Markdown formatting: Structure your content for clarity and easy scanning.
- Emotional prompting: Use expressive language to shape the AI’s tone and create more engaging, relatable responses. For example, “Can you tell me a cozy bedtime story that’s warm and comforting?”
- Add voice realism: Incorporate natural speech elements like stuttering, hesitations, and pauses:
- Stuttering: Use repeated letters or sounds (e.g., “I-I-I don’t know”).
- Hesitations: Add fillers like “uh,” “um,” or “well” (e.g., “I was, uh, thinking about it”).
- Pauses: Use ellipses (”…”) to indicate a pause (e.g., “I… I don’t know how to say this”).
- Emotional emphasis: Use capital letters, exclamation marks, or ellipses to reflect tone (e.g., “I can’t… I just can’t believe it!”).
Common issues
Numbers sound robotic?
- Spell out numbers in prompts for more natural-sounding speech.
How to make assistants sound more human-like?
- Add personality and tone to the assistant. For example:
Example: Appointment setter prompt
Additional resources
Check out these additional resources to learn more about prompt engineering: