Skip to main content
Conditional prompting is a sophisticated technique used to design AI voice agents that can navigate through a structured sequence of interactions. This approach allows the AI voice agent to adapt its responses and actions based on specific conditions or what user says at each stage of the conversation. Think of conditional prompting as creating a smart, interactive, highly conversational AI IVR. Just as a skilled human representative would guide a conversation through different phases, conditional prompting enables our AI voice agent to do the same, ensuring a seamless and logical progression through various stages of interaction.

Key aspects of conditional prompting include:

  1. Structured Stages: The conversation is divided into distinct stages, each with its own objectives and specific prompts.
  2. Adaptive Responses: The AI voice agent’s responses and actions are tailored based on what the user says and some predefined conditions.
  3. Seamless Transitions: The AI voice agent moves naturally between stages, maintaining context and continuity.
  4. Personalization: Information gathered in earlier stages can be used to personalize later interactions.
For example, in a lead qualification scenario for a US health insurance company, the AI voice agent might:
  1. Welcome the user with a friendly, personalized greeting (e.g., “Hi there! Thanks for your interest in our health insurance services.”).
  2. Explain the purpose of the call (e.g., “I’m here to help find the best insurance options for you.”).
  3. Ask for the user’s age or the age of the person needing insurance, using any persuasive techniques or objection handling, if necessary.
  4. Determine if the user is 65 and above or below 65 based on the provided age.
  5. Transfer the call to the appropriate licensed insurance agent (one specializing in Medicare for those 65 and above, or general health insurance for those below 65).
Using conditional prompting, you can define these distinct conversation stages. This method ensures that the prompts are precise and relevant to each stage, making the interaction more effective and compliant with US insurance regulations.

When to use conditional prompting

Conditional prompting is best used when a conversation involves a series of stages in a conversation, where the answer provided by the user at each stage determines the next stage. Couple of other reason for using conditional prompting would to maintain strict flow for consistecy and compliance and where high accuracy is needed. Another simple example for this can be:
Stage 1: The AI voice agent greets the caller and verifies their identity.
“Hello, this is HealthCare Insurance. May I speak with [Caller’s Name]? For security purposes, can you please confirm your date of birth?”
If identity is confirmed, move to Stage 2a. If not, move to Stage 2b.
Stage 2a: The AI asks about the purpose of the call.
“Thank you for verifying your identity. How may I assist you today? Are you calling about a claim, coverage information, or something else?”
Stage 2b: If identity cannot be verified, the AI politely ends the call.
“I’m sorry, but I’m unable to verify your identity. For your security, I cannot proceed with this call. Please call back with your member ID or visit our website for assistance.”
Stage 3: Based on the caller’s response in Stage 2a, the AI proceeds accordingly:
For claims:
“I understand you’re calling about a claim. Before we proceed, I need to inform you that this call may be recorded for quality and training purposes. Do you consent to this?”
If yes, move to Stage 4a. If no, move to Stage 4b.
For coverage information:
“Certainly, I can help you with coverage information. Before we continue, please note that I can only provide general information about your policy. For specific medical advice, please consult your healthcare provider. Do you understand and wish to proceed?”
If yes, move to Stage 5a. If no, move to Stage 5b.
Stage 4a: (Claims - with consent)
“Thank you. Can you please provide your claim number or the date of service for the claim you’re inquiring about?”
Stage 4b: (Claims - without consent)
“I understand. Without recording consent, I can only provide general information. For specific claim details, you’ll need to consent to recording or use our secure online portal. Would you like information on how to access the portal?”
Stage 5a: (Coverage - proceeding)
“Thank you. What specific aspect of your coverage would you like to know about?”
Stage 5b: (Coverage - not proceeding)
“I understand. If you’d like to review your coverage details privately, you can log into our secure member portal. Would you like instructions on how to access the portal?”

Lets visualize it here:

Best Practices for Conditional Prompting

When implementing conditional prompting, keep these key points in mind:
  1. Combine Related Steps
  • Group logically related steps that use similar tools.
  • Example: Combine “Ask for Name” and “Ask for Email” into a single “Gather Contact Info” step/stage.
  1. Provide Clear Instructions
  • Each prompt should explicitly state what the agent should do and what response is expected from the user.
  • Example: “Please ask the user for their preferred contact method: phone or email.”
  1. Guide Conversations Back on Track
  • If the user deviates, acknowledge their input and gently redirect to the current topic.
  • Example: “I understand your interest in [unrelated topic]. To help you best, let’s first finish discussing [current topic]. We can explore that afterwards if you’d like.”
  1. Ensure Progression Between Steps
  • The agent progresses to the next step or a specific step only in two cases:
    • When the extract_data function is executed.
    • When the yes_or_no function is executed.
Important: If a step’s prompt doesn’t have any tools or perform any actions, the agent will remain at that step and use the same prompt.