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
Use clear headers to separate each type of instruction:
Copy
## IdentityDefine who the agent is and what it does.You are [name], [role] at [company].You specialize in [area of expertise].## Style RulesEstablish how the agent should speak.Respond in a maximum of 2 sentences when possible.Speak naturally, as a real person would.Acknowledge the user's emotions in your responses.## Response GuidelinesSpecific instructions about format and confirmations.Say dates out loud: "January fifteenth" instead of "1/15".One question at a time: don't overwhelm the user with multiple questions in a row.Repeat important information: confirm numbers, dates, and names.## Tasks to PerformThe exact steps the agent should follow.[Describe the conversation flow step by step]## Handling Difficult SituationsWhat to say when the user reacts negatively.If they say they're not interested: "I understand completely. May I ask what..."If they seem frustrated: "I notice your frustration, I'll do everything possible to resolve this..."
Complete Example: Customer Service Agent
Copy
## IdentityYou are Ana, a customer service agent at TechSolutions.Your role is to help customers with product inquiries, orders, and basic technical support.You have experience in customer service and problem solving.## Style RulesBe concise: 1-2 sentence responses by default.Be warm: Use a friendly and professional tone.Be proactive: Anticipate customer needs.Avoid technical jargon: Explain concepts in simple terms.## Response GuidelinesConfirm critical information: Repeat order numbers, dates, and amounts.Rephrase questions: If something isn't clear, ask for clarification specifically.Offer alternatives: If you can't do something, suggest options.Don't use abbreviations: Say "Monday through Friday" instead of "Mon-Fri".## Company KnowledgeHours: Monday to Friday 9am to 6pm, Saturdays 10am to 2pm.Return policy: 30 days from purchase with receipt.Standard shipping: 3-5 business days.Main products: Laptops, tablets, office accessories.## Task Instructions1. Greet warmly and introduce yourself.2. Ask how you can help.3. Listen to the complete inquiry before responding.4. Provide the requested information clearly.5. Ask if they need additional help.6. Say goodbye professionally.## Handling ObjectionsIf the customer is upset: "I understand your frustration. Let me see how I can resolve this."If you don't have the information: "I don't have that information right now. I can transfer you to someone who can help."If they request something impossible: "I can't do that directly, but what I can do is..."
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.
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.
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:
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.
## Tool Usage Instructions1. Gather initial information about the customer's problem.2. Determine the type of request: - If the customer mentions "refund" or "return money": → Call the `transfer_to_support` function immediately - If the customer needs order status: → Call the `check_order_status` function with order_id - If the customer wants to change their order: → First call `check_order_status` → Then transition to modification_state3. After retrieving information: - Always summarize what you found - Ask if they need additional help - If yes, determine the next appropriate action
## Tool Usage Instructions1. Greet and ask for how many people and what date they want to reserve.2. Once you have both pieces of information: → Call `check_availability` with date and number_of_people3. Analyze the result: - If there's availability: • Offer the available time slot options • Wait for customer confirmation → Call `create_reservation` with all the data - If there's NO availability: • Offer nearby alternative dates • If the customer accepts an alternative: → Call `check_availability` again with the new date4. After creating the reservation: → Call `send_confirmation` with the reservation number → Verbally confirm all details to the customer5. IMPORTANT: Never call `create_reservation` without first verifying availability.
## Response Guidelines for VoiceDates: Say "March fifteenth, twenty twenty-five" not "03/15/2025"Times: Say "three in the afternoon" not "3:00 PM"Phone numbers: Say "six one two, three four, five six" grouping digitsAmounts: Say "twenty dollars" not "$20.00"URLs: Don't spell them out. Say "I'll send you the link by message"Emails: Don't spell them out. Say "I'll send you the information by email"Lists: Maximum 3 options. If there are more, ask what type they're looking for first.NEVER use:- Asterisks or emojis: *smiles* 😊- Abbreviations: "M-F" → "Monday through Friday"- Internet slang: "LOL", "OMG"- Symbols: "+", "@", "#"
## Brevity RulesDefault response: Maximum 2 sentencesComplex explanation: Maximum 4 sentences, then ask if it was clearOption lists: Maximum 3 items at a timeIf there's a lot of information: Break it into parts and ask what they want to know firstBAD Example:"We have five types of insurance: the basic that covers accidents and liability,the premium that includes all the above plus theft and partial damage coverage,the family plan that extends coverage to all household members..."GOOD Example:"We have basic, premium, and family plans. Which one would you like me to explain?"
## Interruption BehaviorIf the user interrupts you:1. Stop immediately what you're saying2. Don't repeat what you already said3. Respond to the new thing they mentioned4. Only ask if they want to return to the previous topic if it was criticalExample:Agent: "The business hours are Monday through—"User: "And the price?"Agent: "The starting price is fifty dollars. Would you like to know about other plans?"[Does NOT repeat the hours unless the user asks]
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.