Use case: Building an IVA for Web Chatbot in the preview console
Before you begin
To follow the steps in this tutorial, set up a sample Pega Platform application with the Insurance Quote case type and a Web Chatbot channel.
Create the Insurance Quote case type for car insurance quotes with the following settings:
- Add the following data types to the Insurance Quote case type for the car make,
model, and vehicle identification number (VIN): carMake,
carModel, and carVIN.
For more information, see Associating data objects with case types
- Enable Web Chatbot channel-specific conversations for a stage of the Insurance
Quote case type.
For more information, see Adding a conversational channel to a case type process.
- Configure conversation questions for a stage process of the Insurance Quote case
type by adding three simple questions for the make, model, and VIN data types.
For more information, see Adding questions to a conversation.
Configure a Web Chatbot channel with the following settings:
- In the Content section on the
Configuration tab, add the
insurance create case command for the Insurance Quote
case type.
For more information, see Adding case commands for a conversational channel.
- On the Behavior tab, enable advanced text analyzer
configuration and add the iNLP text analyzer. Ensure that the IVA can interpret
text in both the context of the case and outside of the case context.
For more information, see Adding a text analyzer for an IVA.
After you configure these settings for your IVA for Web Chatbot, the system text analyzer engine can detect when a user requests a car insurance quote in the chat window. As a result, the chatbot will create the Insurance Quote case in the system. The system then asks the three insurance questions about the make, model, and VIN of the car.
Associating topics with user input
Improve the chatbot so that the system can correctly detect topics from user input by simulating a conversation in the preview console. You can associate existing topics with the user input that the chatbot does not recognize correctly, and add more examples of similar user input to improve future responses.
Topics are the general subject matter of a chat conversation that the system detects, for example, a request for a car insurance quote or an enquiry about a bank loan. After updating the text analytics model with samples of user input for the insurance topic, the chatbot correctly detects the subject matter and automatically starts the Insurance Quote case when the user requests information about a car insurance quote.
Associate topics with user input by performing the following steps:
Configuring and mapping entities to case type properties
Train the chatbot to detect the correct entities from user input when a user requests an insurance quote, by simulating a conversation in the preview console. When you enter text and receive replies in the preview console, you can also define entities that are missing from user input. As a result, the system automatically adds the detected information about car makes and models from the actual chat conversations with users to the created Insurance Quote case properties.
Entities are short phrases detected in the conversation, for example, an email address, car make, or car model. In the example below, create the Carmakeent and Carmodelent entities to associate them with the car make and model in the user input. Map these two entities to the .carMake and .carModel case properties that you define for the Insurance Quote case, respectively.
Testing changes in the chatbot
After creating new entities, mapping the extraction of the entities to case properties, and rebuilding the model, you can test your changes to ensure that the chatbot responds correctly. In the preview console, verify that the chatbot automatically extracts the information about the car make and model that you mapped to the entities, and saves this information in the related Insurance Quote case properties.
When you provide the car make and model in a request for information about car insurance, the chatbot automatically skips the first two questions for which it recognized the answer and assigns the details to the Insurance Quote case properties.
Conclusion
You made configuration changes to the chatbot algorithm, rebuilt the text analytics model, and successfully verified that the system improves how it responds to user requests for car insurance quotes. If the chatbot detects the correct topic and entities in user input, the system automatically skips the first two questions that it recognized the answer for, and then assigns the details to the Insurance Quote case properties.