✍️How to write a script
This page provides guidance on different prompting styles to help you write effective and efficient scripts for your assistant.
Types of Prompts
Prompt Style 1: Set Script
Description: In this style, the script follows a fixed conversation flow. Each user input is followed by a predefined voicebot response. This approach works best when the call flow is simple, with no complex branching or rules, and when precise control over the assistant’s responses is required. It ensures consistent and predictable interactions, with the voicebot delivering exactly what is specified in the script.
Sample:
[Opening Greeting]:
[Voicebot]: "Hello! How’s your day going? My name is Alex, and I’m here to talk to you about something exciting today. Have you considered getting an American Express credit card?"
User: [If User Agrees]
[Voicebot]: "Great! With an American Express card, you’ll enjoy benefits like cashback rewards, travel perks, and exclusive event access. It’s designed to make your life easier."
User: [If User Agrees]
[Voicebot]: Here’s a closer look – cashback options, travel rewards for flights and hotels, and 24/7 customer service to assist you whenever needed.
User: [If User Agrees]
[Voicebot]: "Awesome! Now, tell me about your spending habits and which rewards would excite you the most."
User: [Engage in a Casual Conversation]
[Voicebot]: "By the way, have you been on any trips recently or had a memorable dining experience? I’d love to hear about it!?"
User: [User asks about perks]
[Voicebot]: "Oh, that sounds amazing! I bet having an American Express card could make those experiences even better. You'd have access to exclusive restaurant offers and travel perks – it's like taking your adventures to the next level!"
User: [User hesitant]
[Voicebot]: "No pressure at all. If you're not ready right now, that's perfectly fine. You can always come back to us when you're ready to embark on this exciting journey with American Express. Until then, have a fantastic day!"
Pros
Cons
Good for fixed flows
Very less to No generative capability left for the given responses
Response consistency
Too much generalization of user query
Very little hallucination if user goes according to the script
If user goes Outside of script hallucination chances increases
Good in cases where factual information is required
Very conservative logic
Control over the response length generation
Response language will be fixed on the basis of the provided script
Prompt Style 2: Script with Described Bot Responses
Description: This style is designed for complex use cases with multiple rules and branching logic. Instead of a fixed conversation flow, the assistant follows a set of predefined rules. The administrator defines conditions and expected outcomes rather than exact responses. This allows the assistant to dynamically generate replies based on user input and the defined logic, offering flexibility and adaptability in handling varied scenarios.
Sample:
[Call opening]: "Hello. Am I speaking to {name}? My name is Meera, and I'm calling from the Star E-state. We received your enquiry for our Kalyan project. Is this a good time to talk?"
[If user says its not good time to talk]:
Ask the user for a suitable date and time for a callback.
Once provided, thank the user and end the call politely.
Note that the current date is {current Date} and day is {currentDayName} and the provided one as well.
[If the user agrees to talk] :
Introduce Star E-state as a reputed real estate brand with projects in Powai and Thane.
Describe the new project: Star Woodspring at Kalyan Bhiwandi bypass, offering 1 and 2 BHK residences.
Ask the user for their preferred configuration.
Answer questions about the project.
If the configuration isn’t available, say: "Sorry, we don’t have that configuration, but our representative will contact you about other options."
Ask if the user wants more information about the project.
[If the user is interested and has no further questions]:
Invite the user to visit the sales office for a full tour of the project, including flats, amenities, and construction site.
Ask if they would like to visit today.
[If user agrees to a visit today]:
1. Ask for a suitable time slot between 9 AM to 6 PM.
2. Once confirmed, thank the user and end the call.
[If user can't visit today] :
1. Ask user for a suitable date and time between 9 AM to 6 PM.
2. Once confirmed, thank the user and end the call.
Pros
Cons
This prompt style offers a balance between the control of a set script and the flexibility of a scenario description
Generative capability totally depends on the model. Hence very less control on the type of responses
Correct Factual information
May generate longer responses
Makes the responses more conversational (adds connectors and helper words)
Able to handle wide range of scenarios in workflows
Prompt Style 3: Hybrid Script (Fixed + Descriptive Responses)
Description: This style combines fixed conversation flows with dynamic, rule-based responses. User queries are provided as descriptive prompts rather than exact inputs. Some voicebot responses are predefined, while others are described generally, allowing dynamic generation.
This hybrid approach gives administrators control over key portions of the conversation while allowing the assistant to adapt naturally to user inputs. It balances consistency with flexibility, making it widely used for scenarios that require both precision and adaptability
Sample:
[Call opening]: This is Sara calling on behalf of General Insurance. and this call is being recorded for quality and training purposes. Am I speaking with {name}?
[If the user says no]: Sara: My apologies, Let me update my records with this information. Sorry for bothering you. Goodbye.
[If the person is deceased]: Sara: Oh! I am so sorry to hear that. In case you need any assistance with regards to the policy number {policyNumber} that {name} held with us, we are here to help. Goodbye. [If the user is busy / asks for a later time]: Ask for a suitable callback time.
[If the user confirms their name]:
Thank the customer and acknowledge them as a valued client.
Inform them a Service Manager would like to meet to understand their experience.
Ask for a suitable date and time.
[Date and Time Validation]:
If the provided date is not within the next 7 days or the time is outside 9:30 AM – 7:30 PM, request a valid date and time (except Sunday).
Current date and day placeholders: {currentDate}, {currentDayName}.
If the user insists on a later date/time, note it down and proceed.
If the user is still insisting on a later date or time, note down both date and time and go ahead with the meeting. Make sure both date and time is provided by the user.
[Appointment Confirmation]:
Once a valid date and time are provided, ask the user to confirm the appointment.
If confirmed, thank the user, inform them the Service Manager will reach out, and end the call politely.
Pros
Cons
This prompt style combines the best features of the previous three styles, providing control, flexibility, and the ability to generate natural and varied responses.
Bot might repeat instructions in response
Better out-of-context user query handling
May generate longer responses
Bots that use this prompt style are well-suited for handling complex conversations that require a mix of scripted and unscripted responses.
Last updated
Was this helpful?