Suggestions for Slot Values
Once an end-user query is received by a task bot, the entities present in the query are recognized along with the intent. The default way to identify custom entities is based on string match where the value present in the query must be an exact match of the configured entity value or one of its synonyms. There are cases where the users aren’t aware of the exact value of a slot that the bot is expecting. Such cases can lead to the intent being abandoned or the developers having to add numerous synonyms to handle all the possibilities.
With the 'Provide suggestions for slots' feature, task bots can detect custom entities that are misspelt, provided partially, or similar to other entities. These values are presented to end-users as suggestions at the time of slot filling and as alternatives that they can query for at the time of intent completion. Developers can utilize this feature for specific intents in their bot by enabling the ‘Provide suggestions for slots’ feature in their intents.
Within an intent, the feature can be used for specific slots by enabling or disabling ‘Auto-suggest slot values’ feature for entities.
Two new response templates are added to task bots by default to share the suggestions with consumers at appropriate steps.
- Entity suggestion: For suggesting required entities to users at the time of slot filling. This response is sent along with the template key configured for a particular required slot.
- Response suggestion: For suggesting alternate slot values a consumer might be interested in based on what they’ve provided in the intent.
The suggestions are provided differently depending on how intents and entities are configured.
Required slots during the intent flow
Based on the user input and the values configured in the custom entity linked as a slot in the intent, values for a particular slot are suggested at appropriate steps in the intent completion flow. Once suggestions are generated for a user query, we use them at the appropriate slot filling step, irrespective of the query (over the course of the conversation) these suggestions were generated from.
In the above example:
- The user wishes to book an appointment and provides a reason for the same.
- ‘Book an appointment’ intent is matched. The first slot for this intent in ‘reason’ where we expect the purpose of the appointment from the user.
- The reason in initial user query doesn’t match with any values configured in the custom entity ‘reason’.
- However, it partially matches a few values and those are returned as suggestions by the platform.
- Along with the template key configured to prompt the user for a reason, the suggestions generated in the conversation so far are presented as quick replies.
In the above example, the consumer provides a location in their first query that doesn’t match any locations configured in the custom entity. The location slot in the intent is configured after reason, date, and time. The suggestions generated for the location based on first user query are presented to the user along with the prompt for location.
Alternate suggestions for mandatory slots
For cases where multiple entity values are similar or if one entity value is a substring of another value, alternate slot value suggestions are provided to the user once the intent is completed.
In the above example:
- User selects ‘tooth removal’ as the reason for their appointment and completes the intent by providing date, time, and location.
- Once the intent is completed, the bot responds with the final template key along with the ‘Response suggestion’ template key, which suggests slot values similar to ones they’ve provided during the conversation.
Suggestions for optional slots
The end-users aren’t prompted for any optional slots that are present in an intent. Any slots that are good-to-haves and required for completing an intent are marked as optional. Any suggestions for optional slots are sent along with the final response as a quick reply. This quick reply button is generated by substituting the suggested value for the part of user query that resulted in the suggestion.
In the above example:
• Location is a required slot and weather attribute (wind speed, humidity, etc.) is an optional slot.
• User query is matched to ‘check weather’ intent and the location slot is filled.
• The attribute slot isn’t filled from the user query, but we get a suggestion for it.
• This is sent back to the user by replacing the part that resulted in the suggestion (‘wind’ in this case) with the suggested value (‘wind speed’).
Updated 8 days ago