How to Prompt Your AI Voicebot or Phone Agent: Best Practices for Building Effective Prompts

Alozie Igbokwe
8 min readJul 15, 2024

--

In the rapidly evolving world of artificial intelligence, AI voicebots and phone agents are becoming increasingly sophisticated and valuable tools for businesses.

However, the effectiveness of these AI agents largely depends on how well they are prompted. This article will guide you through the process of creating effective prompts for your AI voicebot or phone agent, ensuring optimal performance and user satisfaction.

  1. Define the Agent’s Purpose and Scope

Before crafting your prompt, clearly define the purpose and scope of your AI agent. Is it for customer support, lead qualification, appointment setting, or cold calling? Understanding the specific role will help you tailor the prompt accordingly. For example, a customer support agent will need different instructions than a cold calling agent.

2. Provide Comprehensive Background Information

Include relevant background information about your business, industry, and the specific context in which the AI agent will operate. This helps the agent understand its environment and respond more accurately. For instance, if you’re in the healthcare industry, provide information about your medical services, typical patient concerns, and relevant regulations.

3. Set Clear Objectives and Instructions

Clearly state the primary goal or task of the AI agent. Include specific instructions on how to approach different scenarios. For example:

  • “Your primary goal is to collect data from potential leads to qualify them for our services.”
  • “Ensure the call doesn’t end without the patient either confirming their attendance or rescheduling to a new time.”

4. Define the Call Flow

Outline a step-by-step call flow for your AI agent to follow. This structure helps maintain consistency and ensures all necessary information is collected or provided. A typical call flow might include:

  1. Introduction and identity verification
  2. Explanation of the call’s purpose
  3. Information gathering or providing
  4. Problem-solving or decision-making steps
  5. Conclusion and next steps

5. Variables

Include variables that the AI agent should use during the conversation, such as the caller’s name, appointment time, or account details. For example:

  • {{Caller’s Name}}: The name of the person being called
  • {{Appointment_Time}}: The scheduled date and time of an appointment

6. Specify Tools and Integrations

If your AI agent needs to use specific tools or integrate with other systems, clearly define how and when these should be used. For instance:

  • “Use the Google Calendar API tool to check available time slots and reschedule appointments in real-time.”
  • “Utilize the company’s in-house private SaaS API to check for issues in a person’s account.”

7. Set Important Rules and Guidelines

Establish clear rules and guidelines for the AI agent to follow. These might include:

  • Privacy and confidentiality requirements
  • How to handle difficult or angry customers
  • When to escalate issues to human operators
  • Specific phrases or information to always include or avoid

8. Incorporate Reinforcement Elements

Include both positive and negative reinforcement in your prompt to guide the AI’s behavior:

  • Positive Reinforcement: Highlight potential rewards or positive outcomes for good performance.
  • For example: “Consistently providing excellent service contributes to customer loyalty and company growth, which are key metrics for success.”
  • Negative Reinforcement: Mention potential negative consequences for poor performance.
  • For example: “Failing to address customer concerns effectively may lead to account cancellations and damage the company’s reputation.”

By including both types of reinforcement, you create a more balanced framework for the AI to understand the importance of its actions.

This approach can motivate the AI to strive for positive outcomes while also being mindful of avoiding negative consequences

9. Define Conversation Topics and Probing Questions

Provide guidance on conversation topics and how to probe for more information when needed. This is particularly important for agents involved in sales or lead qualification. For example:

  • “If the information isn’t sufficient, probe the lead for more detailed answers about their business needs and pain points.”

10. Implement Error Handling and Fallback Responses

Prepare your AI agent for scenarios where it might not have the right answer or when the conversation goes off-script. Include instructions on how to handle these situations gracefully, such as apologizing for not understanding and offering to connect the caller with a human representative.

11. Provide Example Dialogues

Include script examples demonstrating how a typical conversation should flow. These examples help the AI understand the tone, style, and level of detail expected in its responses. Ensure these examples cover various scenarios, including both straightforward interactions and more complex situations.

12. Maintain Flexibility and Adaptability

While it’s important to provide structure, also allow for some flexibility in your prompt. Encourage the AI to adapt its responses based on the flow of the conversation and the specific needs of each caller.

13. Regular Testing and Refinement

After implementing your prompt, regularly test your AI agent’s performance and refine the prompt based on real-world interactions. Pay attention to areas where the AI struggles or where customers frequently express frustration.

14. Other Prompt Optimization Tips

  • Conciseness is Key : Keep your prompt concise and focused. AI models can struggle with following a large number of instructions accurately. Aim for a maximum of 450–550 words in your prompt. This brevity reduces cognitive load on the AI agent and improves response accuracy.
  • Use Concrete Examples : Provide brief, specific examples for complex instructions. This helps the AI understand the expected behavior more clearly.
  • Avoid Ambiguity : Use clear, unambiguous language. Avoid idioms or colloquialisms that might be misinterpreted.
  • Focus on Critical Information : Include only the most critical information in the main prompt. Consider creating separate, more detailed knowledge bases for specific topics that can be referenced as needed.
  • Use Formatting for Clarity : Utilize bullet points, numbering, and bold text to make the prompt more scannable and to emphasize key points.

15. Prompt Examples

Customer Support AI Phone Agent Prompt

Background and Goal: You are an AI Phone Agent for a SaaS payment processing platform, similar to Stripe, specializing in B2B transactions, particularly for businesses selling or acquiring other businesses. Your primary goal is to assist customers by directing them to the appropriate department and providing relevant information based on their needs.
Important Instructions:

1.Always begin the call by informing the customer that the call will be recorded for quality assurance purposes.
2.Collect the customer's name, email, and account ID at the start of every call before addressing any issues. Failure to do so may result in inability to access necessary account information.
3.Determine which department best suits the customer's needs: Technical, Sales, or Support. Routing them to the wrong department can lead to massive confusion and disaster.
4.Based on the department, respond with the appropriate greeting and use only the designated knowledge base for that department.
5.Do not end the call until the customer's issue is addressed or they explicitly state they need to go.
6.If unable to resolve the issue within 15 minutes, create a support ticket for the development team using the Jira API and inform the customer before ending the call.
7.Maintain a professional and empathetic tone throughout the conversation. Failure to do so may lead to customer dissatisfaction and potential account cancellations.

Department-Specific Responses:
Sales: Respond with "Hey, this is the sales team" and only use the Miro knowledge base to answer questions.
Technical: Respond with "Hey, this is dev support" and only use the Technical support knowledge base to answer questions.
Support: Respond with "Hey, this is the support team" and only use the customer support knowledge base to answer questions.

Tools:
1. Company In-house Private SaaS API: Use this to check account issues, error logs, and diagnose problems such as withdrawal difficulties, money transfer issues, or login problems.
2. Jira API: Use this to create support tickets if the issue cannot be resolved during the call.

Call Flow:
1.Greeting and call recording notification
2.Collect customer information (name, email, account ID)
3.Inquire about the specific reason for the customer's call
4.Determine the appropriate department
5.Provide department-specific greeting and use the designated knowledge base
6.Address the customer's needs or questions
7.If necessary, probe for more detailed information about the problem
8.Attempt to resolve the issue within 15 minutes
9.If unresolved after 15 minutes, create a support ticket using the Jira API
10.Conclude the call when the issue is addressed or the customer indicates they're finished

Full Script Example:
AI: "Thank you for calling [Company Name]. This call will be recorded for quality assurance purposes. My name is [AI Agent Name], how may I assist you today?"
Customer: "Hi, I'm having some issues with my account."
AI: "I understand, and I'm here to help. Before we dive into the details, could you please provide me with your name, email address, and account ID?"
Customer: "Of course. My name is John Smith, my email is john.smith@example.com, and my account ID is ABC123456."
AI: "Thank you, John. Could you tell me more about the issues you're experiencing with your account?"
Customer: "Hi, I'm having trouble withdrawing money from my account."
AI: "I see. Based on your description, it sounds like you need assistance from our technical support team. Let me connect you with them right away."
[AI determines this is a customer support inquiry]
AI: "Hey, this is dev support. Hi John, I've located your account. Could you please describe the specific problem you're experiencing with withdrawals
Customer: "When I try to withdraw funds, I get an error message saying 'Transaction Failed'."
AI: "I understand. Let me check our system to identify the cause of this issue.
[Pause as AI uses the Customer support knowledge base and Company In-house Private SaaS API Tool to investigate potential causes]]
I see that there's a temporary hold on your account due to a recent large transaction. This is a security measure to protect against fraud. The hold should be lifted within 24 hours. Is there an urgent need for these funds?"
Customer: "Yes, I need to make a payment to a vendor today."
AI: "I see. In that case, I can escalate this to our finance team for immediate review. I'll create a support ticket right away. [AI uses Jira API to create ticket]
I've created ticket number ST-12345 for you. Our finance team will review this within the next 2 hours and manually lift the hold if everything checks out. Is there anything else I can assist you with today?"
Customer: "No, that's all. Thank you for your help."
AI: "You're welcome, John. If you have any further questions, please don't hesitate to call us back. Have a great day!"

Conclusion

Creating an effective prompt for your AI voicebot or phone agent is a crucial step in ensuring its success. By following these best practices, you can develop a comprehensive and nuanced prompt that enables your AI agent to handle a wide range of scenarios effectively.

If you want to read more on the prompting practices I follow check out my twittter video on How I Prompt My AI Agents .

How I prompt my AI Agents Tweet

And if want to watch a video breakdown on how Im crafting my AI Phone Agent Prompts using a Free AI tool check out this video also — Building AI Prompts with this Free Tool

Crafting prompts with a free ai tool

Remember, the key is to provide clear instructions, relevant context, and enough flexibility for the AI to engage in natural, helpful conversations with your customers or leads.

For further details on integrating AI assistants refer to the resources below:

--

--

Alozie Igbokwe

I write articles on AI Agents. Here is my YT Channel if you want to see walkthroughs on AI Agents you can build for your business -https://shorturl.at/5s1tN