Guidelines for User Messages
- Getting Started
- Bot Building
- Smart Agent Chat
- Conversation Design
-
Developer Guides
Code Step Integration Static Step Integration Shopify Integration SETU Integration Exotel Integration CIBIL integration Freshdesk KMS Integration PayU Integration Zendesk Guide Integration Twilio Integration Razorpay Integration LeadSquared Integration USU(Unymira) Integration Helo(VivaConnect) Integration Salesforce KMS Integration Stripe Integration PayPal Integration CleverTap Integration Fynd Integration HubSpot Integration Magento Integration WooCommerce Integration Microsoft Dynamics 365 Integration
- Deployment
- External Agent Tool Setup
- Analytics & Reporting
- Notifications
- Commerce Plus
- Troubleshooting Guides
- Release Notes
Table of Contents
User Messages GuidelinesSteps vs Intents vs User MessagesBest practices for building the botDOsDONTsHow to improve the accuracy of Step detection?Sample user messages the utteranceUser Messages Guidelines
Now that you know what User Messages are, you can create better variations that are added in the User Messages section using the following best practices which aid the Machine Learning algorithm to improve the step detection.
Steps vs Intents vs User Messages
Steps are the interlinked building blocks of a bot. Each step encompasses components such as User messages, Bot Responses, Entities, and API integrations needed to identify the user's intention.
Intent is a box of expressions that mean the same thing from a linguistic perspective but are constructed in different ways. The ‘User Messages’ section is simply a representation of this intent.
User Messages are the user utterance that the assistant needs to interpret the user goal. Add variations of the utterance in the user messages section to make the bot smarter.
For example, if users want to ‘track an order’, the user could say any of the following -
- Track my order
- Why is my order late?
- Delivery executive number
- Order ETA
All the above are their own steps in our system, with their corresponding intents which will help users track an order
Best practices for building the bot
DOs
-
Define distinct intent
Having proper distinction for intents should result in recognition of the right intent.
If the vocabulary of the sentences in two intents is more or less the same, combine the intents, and use entities instead.
For example, consider the following variants -
I want to book a flight I want to book a hotel -
Balance your user messages across steps
The number of example utterances in each step must be relatively equal, for the detection to be accurate.
If you have one step with 100 sample user messages and another step with 20 sample user messages, the step with 100 user messages will have a higher chance of getting detected.
-
When to create a step vs entity
Create a new step for tasks that your bot will perform. Use entities as parameters that make that task possible.
For a bot that will get offers for phones, create one PhoneOffers step. Do not create steps for every phone or every model. Add phone or models as entities and use them in the sample user messages.
-
Adding new words to the vocabulary
For the bot to learn new words specific to a domain, they should occur at least 3 times in the bot’s user messages. Eg. Apple, VOLTE. Another thing which we should add here is, for bots (like RTS, etc), which have "domain-specific words" like "apple, pmay etc" which are not "English words" but have meaning in a particular domain, those non-English words should occur at least 3 times in the bot for us to consider them as "domain-specific words".
The higher the number of times in DIFFERENT CONTEXT these words occur, the better will be our understanding (embedding) of these words.
If a non-English word occurs less than 3 times in the whole bot, we'll consider it to be a spelling mistake
DONTs
-
Expansion of scope of intent
If the variations are expanding the scope of the intent, create a new step and add variations on the new step.
For example, consider the ‘track order’ use case. All the below-mentioned utterances have different goals. Avoid adding all these utterances to the same step. Handle them as separate intents and add them to different steps in your bot.
track my order talk to a customer care representative my request has not been fulfilled -
Fragments
User messages should refer to an action or request. Should not be partial fragments. Partial or incomplete phrases decrease the chance of the user getting a relevant bot response. We’d want a bot builder to add full sentences as the User messages, so our classifier understands the correct intent on a step. And in cases when there are similar intents on a bot, our disambiguation feature should handle ambiguous user queries. Read more on disambiguation later in this guide.
For partial fragment example, consider the following user messages variants -
Correct Incorrect I want to know the price of a 2kg cylinder 2kg how to apply for a loan loan play bahubali on Netflix play how to apply for a loan apply contact details of the dealer dealer why were points deducted from my account points what is the process of scoring points score -
Chit Chat:
Use Smalltalk. Do not create steps to handle general chit-chat.
How to improve the accuracy of Step detection?
Add a minimum of 10 variations to increase the accuracy of step detection. If you have any step with one or very few example utterances, the system will not be able to accurately detect the step. This is especially important when you have multiple steps that are very close in their meaning.
Add user messages variants that you think users might enter. Include utterances, which mean the same thing but the sentences are structured in a different form. Add variations to user messages which have different patterns, synonyms, sentence structure, tense, etc.
Consider the following sentence structures -
-
Length of user messages - Add the sentence with context. Do not add Fragments without context.
update me on the status of issues I had raised complaint status status of my complaint give me status of issue raised -
Syntactical structure - Add sentences with varied structures
what is the status of my complaint? issue resolved or not? complaint yet not resolved tell me status of the problem I had raised earlier -
Keep the language simple - Think of how the user would represent the action. The user might not be a domain expert, use simple terms in your sentence, that is a part of day-to-day vocabulary
what is the status of my complaint? issue resolved or not? problem yet not resolved -
Position of the entity in user messages - Add variations where entities are placed at the beginning or middle or end of the user utterance
Play harry potter on netflix On netflix play movie harry potter -
Vocabulary - The core term in the sample user messages is "laptop". Add alternatives like desktop, workstation, computer, machine.
How can I get a laptop Where can I get a workstation How to place an order for a machine -
Tense - Our system understands differences in the tense of a sentence. You can add the utterances to different steps and handle them as distinct intents
I will do my booking I did my booking I am doing my booking
Sample user messages the utterance
-
Add variations of the sentence that can be used to perform the same action.
For Example:-
If you are creating a step to get the ‘complaint status’, add variations
- status of my complaint
- complaint status
- I want to know about my complaint
- update me on the status of issues I had raised
- what happened to the issues which were raised by me yesterday
- were you able to resolve my problem?
- what is the status of my complaint?
- is my issue resolved or not?
- are you working on fixing my problem?
- I filed a complaint 2 days ago. Any update?
- give me an update on my complaint.
- provide status for complaint ticket that was raised
- can you help me with the complaint status
-
If you are creating a step to ‘generate leads(the process of identifying potential customers for a business's products or services)', add variations:
- please call back
- request a callback
- provide a demo
- I requested a callback for a demo
- I am planning to apply for a home loan. Need a demo
- I would like to check out the demo
- how can I get a demo for the home loan application
- I want to apply for a home loan
- need a home loan
- can somebody call to help me to apply for the loan
- what is the procedure to apply for house construction
- would like to schedule a callback for home loan application
- I require a home loan to buy a plot
-
If you are creating a step to get the ‘complaint status’, add variations
-
Do not add variations that are not related to the same step, just because the response for the intents is similar.
For Example:-
It is not a good practice to add the below-mentioned user messages variations to the ‘complaint status step’
-
"complaint"
- Why is it wrong - Don’t add single words or fragments such as complaint or status to the user's says. Please add context around these words. It helps in the detection of the right step.
- Do this instead - The step will be detected when the user types a complaint. Solve such cases with disambiguation, but don’t muddle the training data.
-
"what status"
- Why is it wrong - The step will be detected when the user types status. Adding data without proper context will not add proper value to the training data.
- Do this instead - Instead of adding ‘what status’, add ‘what is complaint status’ to the user's says. This provides context around the sentence
-
"you are not able to solve my problem"
- Why is it wrong - Expands the scope of intent itself.
- Do this instead - Create a new step to handle user queries that are not related to the same intent
-
"What is the reason you haven’t resolved my complaint yet?"
- Why is it wrong - Expands the scope of intent itself
- Do this instead - Create a new step to handle user queries that are not related to the same intent
-
"What is the time duration to resolve a ticket"
- Why is it wrong - The scope of intent should be to get the status of the complaint.
- Do this instead - Handle such questions using the FAQ steps section
-
"how to raise a complaint?"
- Why is it wrong - The scope of intent should be to get the status of the complaint.
- Do this instead - Handle such questions using the FAQ steps section
-
"how to check the status of my complaint?"
- Why is it wrong - The scope of intent should be to get the status of the complaint.
- Do this instead - Handle such questions using the FAQ steps section. Provide steps on how users can check the status of a complaint
-
"What is the customer care number?"
- Why is it wrong - There is no mention of complaint status update.
- Do this instead - Handle such questions using the FAQ steps section. Create a FAQ step called ‘Find Customer Care Number’
-
"tickt" / “tckt” / “cmplaint” / “complant”
- Why is it wrong - Don’t add spelling mistakes in the user messages.** Adding spelling mistakes to the user messages muddles the training data.
- Do this instead - Let the spell checker module handle cases when a user enters incorrect spelling in the user utterance. Real-time logs will show the spell corrections performed by the module. If you see any discrepancy in the corrected data, please contact the ML team.
-
"complaint"
-
It is not a good practice to add the below-mentioned user messages variations to the ‘lead gen step’
-
"I have taken the first disbursement of home loan from the bank can I get top-up for furniture"
- Why is it wrong - Expands the scope of intent itself. Top-up loan intent should not be covered under the scope of lead generation.
- Do this instead - All top-up loans related user messages should be added to a new step
-
"transfer it back to XYZ bank will you finance the amount"
- Why is it wrong - Out of scope of the lead generation.
- Do this instead - Create a new step to handle transfers and financing related queries
-
"Can you send your executive to collect my documents"
- Why is it wrong - Expands the scope of intent from lead generation to a request to collect documents
- Do this instead - Create a new step to handle document collection queries
-
"Do I need ITR for applying for a loan"
- Why is it wrong - Expands the scope of the intent.
- Do this instead - Handle such queries using the FAQ steps section
-
"What documents do I need to apply for a home loan"
- Why is it wrong - Expands the scope of the intent.
- Do this instead - Handle such questions using the FAQ steps section. Provide a list of documents required to apply for a home loan.
-
"What is the procedure to apply for a home loan"
- Why is it wrong - Expands the scope of the intent.
- Do this instead - Handle such questions using the FAQ steps section. Provide steps to follow to apply for a home loan.
-
"I tried to call the number but no one is picking up"
- Why is it wrong - Expands the scope of the intent.
- Do this instead - This is a follow-up question from the user. Create a new step to handle such queries.
-
"I have taken the first disbursement of home loan from the bank can I get top-up for furniture"
-
It is not a good practice to add the below-mentioned user messages variations to the ‘complaint status step’