Configure your chatbot for detecting small talk (8.4)
Pega Platform™ chatbots can now automatically detect small talk through the default topic detection model, pySmallTalk. Use this model to configure custom chatbot responses based on the small talk topic that your chatbot detects. Chatbots that use small talk are smarter and more appealing because they appear to have more human qualities, which helps build better connections with users.
The pySmallTalk topic detection model contains the following pre-defined topics:
|Small talk topic||Example|
|Escalation||I want to talk to a human!|
|Greeting||Hi, Howdy! Hello!, How's it going?|
|Goodbye||Bye, See ya, talk to you later!|
|Thanks||Thank you!, Thanks, Much obliged|
The Help and Cancel topics are based on single keywords. You can use them to create a custom action, for example, route the conversation to a sales representative if the user enters the word help or to terminate the conversation when the user enters the word cancel. However, if the user places these words within a context (for example, I would like to cancel my internet subscription or I would like to get your help in booking a flight from New York to San Francisco), then the text analyzer chooses a topic from the business model, which corresponds to that context, for example, Action > Book flight.
Other is a fallback topic, in case the small talk detection model does not find a match for any of the previous categories.
The small talk model is available for English, German, Spanish, Dutch, Portuguese, Italian, and French.
Small talk detection in the Web Chatbot channel
For any Web Chatbot channel that you create, small talk detection is enabled by default, as shown in the following example:
Through the Enable small talk button, you automatically add the pySmallTalk model to the list of topic models in the corresponding text analyzer. At the same time, the pyInteractionDF data flow adds the pxManageSmallTalkTopics activity for processing the NLP outcome. This activity contains the logic for determining whether to classify the text as small talk or being related to your business use case (for example, booking a flight).
Small talk detection logic
To determine whether to consider the text small talk, the pxManageSmallTalkTopics activity compares the confidence score of the topic detection model that addresses your business use case (for example, the banking model) with the confidence score of the small talk detection model. The activity uses the EvaluateSmallTalkTopics decision table to perform the comparison.
Consider the following use cases when a user provides input to a text analyzer:
If the small talk model classifies the input as not belonging to the Other topic, then the pxManageSmallTalkTopics activity compares the analysis results with the business model to determine the final outcome. In this example, Small talk > Greeting is an outcome with a high confidence score and Action > Customer service is an outcome with a low confidence score.
Consider the following example:
If the outcome of the small talk detection is Other, then the activity ignores the small talk model when determining the category with the highest confidence score, and proceeds to assign a topic from the business model to the text.