Skip to main content

Introduction

Prompt engineering is the foundation for creating effective AI phone agents. A well-designed prompt determines how your agent interprets situations, responds to users, and handles edge cases. This guide provides proven strategies for writing prompts that agents can reliably follow.
This guide focuses on general prompt engineering principles. For type-specific implementation:
  • Single Prompt Agents: Apply these principles directly in your prompts
  • Conversational Path Agents: Use these principles within each node’s instructions

Best Practice 1: Organize your prompt into sections

Long, unorganized prompts confuse language models. The solution is to structure your prompt into well-defined thematic blocks. This has important advantages:
  • Easy to maintain: You can modify behavior in one area without touching the rest
  • Reusable: Copy entire sections to other agents that need similar behaviors
  • Greater accuracy: The model understands instructions better when they’re categorized

How to structure an effective prompt

Use clear headers to separate each type of instruction:

Best Practice 2: When to migrate to Conversational Paths

Not all use cases work well with a single prompt. If your agent starts becoming unpredictable or the prompt becomes too long, it’s time to consider a Conversational Path agent.

Signs you need to change architecture:

  • Your prompt has too many “if… then” statements: When you exceed 3-4 conditions, the model starts getting confused
  • You use many tools: With more than 5 integrations, the agent doesn’t know when to use each one
  • You need to remember information: If you must track variables between different moments in the conversation
  • Erratic behavior: The agent responds well sometimes and fails other times in the same scenario

What you gain with Conversational Paths:

  • Focus: Each node has a single purpose, without distractions
  • Reliability: Transitions and tools are triggered deterministically, not dependent on interpretation
  • Simpler debugging: You can identify exactly which node is failing
  • Consistency: Behavior is predictable because it’s explicitly programmed
Rule of thumb: If you’ve written more than 3 blocks of “If the user mentions X, then do Y”, your use case probably works better with a structured flow.

Best Practice 3: Be explicit with tools

This section applies only to Single Prompt Agents. Conversational Path Agents manage function calls automatically based on each node’s configuration.

Why it’s important

A common mistake is thinking the model will know when to use each tool just by reading its description. In practice, this doesn’t work well. The result is an agent that:
  • Uses tools when it shouldn’t
  • Ignores tools when it should use them
  • Confuses which tool to use in each situation

The solution: step-by-step instructions

You need to tell the agent exactly when to activate each tool. Don’t leave anything to interpretation. Use the exact function names in the instructions.

Example: Customer Service Agent

Example: Restaurant Reservation Agent

Keys to writing effective tool instructions

  1. Keywords: Specify what terms or phrases the agent should hear to activate each tool
  2. Execution order: If one tool depends on another, make it clear. For example: “first query, then create”
  3. Restrictions: Equally important is saying when NOT to use a tool. Avoid unnecessary calls
  4. Justification: Add a line explaining what each tool is for. It helps the model understand the purpose

Best Practice 4: Optimization for Voice Conversations

Unlike text chatbots, phone agents must generate responses that sound natural when spoken. This requires special considerations:

Formatting Rules for Voice

Response Length Control

Handling Interruptions

Iteration and Optimization

Iteration is key to perfecting your prompts. Here’s a recommended process:
1

Start with a simple prompt

Use the structures from this guide as a starting point.
2

Test with real scenarios

Make 5-10 test calls with different types of queries.
3

Identify failure patterns

Review transcripts to detect:
  • Moments where the agent doesn’t know what to do
  • Responses that sound unnatural
  • Incorrect tool usage
  • Incorrect or outdated information
4

Refine specific sections

Adjust only the parts of the prompt that caused problems and start the process again
Testing strategy: Ask someone who doesn’t know your agent to make a real call. Their experience will show you problems you wouldn’t see because you know how it “should” work.

Next Steps

Conversational Paths

Learn when and how to use structured flows for greater control.

Call Customization

Adjust voice, speed, and advanced parameters.

Integrate Tools

Connect APIs and databases to your agent.

Version Control

Manage and test multiple versions of prompts.