# Improving the user experience of chatbots in Pega Platform 8.5

**URL:** <https://forums.pega.com/t/improving-the-user-experience-of-chatbots-in-pega-platform-8-5/3802>\
**Category:** General\
**Tags:** chat-and-messaging, 8-5, conversational-channels\
**Created:** [January 13, 2023, 1:26pm UTC](https://forums.pega.com/t/improving-the-user-experience-of-chatbots-in-pega-platform-8-5/3802 "2023-01-13T13:26:34Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![kutzg](https://yyz2.discourse-cdn.com/pega/user_avatar/forums.pega.com/kutzg/32/13651_2.png) [@kutzg](https://forums.pega.com/u/kutzg)\
**Post date:** [January 13, 2023, 1:26pm UTC](https://forums.pega.com/t/improving-the-user-experience-of-chatbots-in-pega-platform-8-5/3802/1 "2023-01-13T13:26:34Z")

</div>

## Identifying weak points in your chatbot

To improve how an Intelligent Virtual Assistant (IVA) processes a conversation, ensure that you understand the weak points and situations during which the chatbot fails to respond to a user correctly. Follow the steps described below. For more information, see [Training the model for the IVA channel](https://docs-previous.pega.com/conversational-channels/86/training-model-iva-channel).

1. Select the **Enable model training** check box, in the **Text Analyzer** section, on the **Behavior** tab of the channel configuration.  
 ![Text analyzer settings.png](https://pega1.discourse-cdn.com/pega/original/2X/8/899cdde0c90bef37c6d2df282f274028a049134e.png)  
Enabling this option ensures that the system collects all utterances for which the chatbot was not able to identify a topic (the subject matter) of the user input. When a topic is not identified for user input, the natural language processing (NLP) engine returns:
  - “No match”
  - “Multiple match” In such cases, the chatbot displays a system message to the user and automatically creates a training record for the unrecognized user input. A channel developer can later review all such training records so that the sample records help to improve the text analytics model and the efficiency of the chatbot responses.

2. When you select a record on the **Training data** tab, you can assign a topic (subject matter) for the record and specify entities within the text of the record. You can use a contextual menu for this purpose by right-clicking on the highlighted text in the training record and selecting an existing entity or creating a new one.  
 ![Training record in App Studio.png](https://pega1.discourse-cdn.com/pega/original/2X/a/aae920d8f6f6fff46805de8cc2e11155172e9016.png)
3. After you finish assigning a topic and specifying entities for a training record, you can mark the training record as reviewed. As a result, the system removes the training record from the list and adds the record to a queue that the system uses to rebuild the text analytics model. When at least one training record is in the build model queue, the system enables the **Build Model** menu item which is disabled by default.
4. To rebuild the text analytics model, click the **More** icon, and then click **Build Model**.  
 ![Option to build model in App Studio.png](https://pega1.discourse-cdn.com/pega/original/2X/3/3bd0ef506c04bf155caffa045d626a284ba53424.png)  
As an alternative, you can also manually create training records by clicking **Add records**.

## Creating a dedicated process to handle the conversation flow

By designing and building IVAs, you expose your business processes ([case types](https://wiki.pega.com/index.php?title=Case_type&action=edit&redlink=1)) in your application through social messaging communicators or a widget that is displayed on a company’s external website. The conversational nature of chatbots you create requires the following general design steps:

1. Create a dedicated parallel process for your case type for the conversational channel by creating a new instance of a channel for which you want to expose your business process. For example, you can create a Unified Messaging channel so that the system exposes your business process to users on the Apple Business Chat, Twitter, or Facebook Messenger social messaging platforms. For more information, see [Pega Intelligent Virtual Assistant overview](https://docs-previous.pega.com/conversational-channels/86/pega-intelligent-virtual-assistant-overview).

2. After you create a channel, you can use the parallel process that the system generates with an explicit condition to ensure that the system uses the correct process during runtime.

3. After you select the stage in your case type, the system displays a list of available channels from which you can create specific parallel processes:  

4. Select the check box for a channel, as shown in the figure above. As a result, the system generates a parallel process for the channel with the shown condition that the system uses during runtime.  

## Specific flow for a social messaging channel in a Unified Messaging channel

The previous section described how to configure a dedicated process for different social messaging platforms supported by the Unified Messaging channel. When you need to add a specific flavor to the conversation that the system handles for a given social messaging platform, you can perform a more granular configuration.

For each social messaging platform that you want to support in your chatbot, you can create an additional parallel process and extend a condition by using the **Native Social Channel** field:

 ![Configure condition section.png](https://pega1.discourse-cdn.com/pega/original/2X/8/8836081e5afe2321c3e693bf81cb1def15183938.png)

You can create an additional parallel process and extend a condition using one of the values shown below:

- **abc** - Apple Business Chat
- **facebook\_pm** - Facebook private message
- **facebook\_comment** - Facebook comment
- **facebook\_post** - Facebook public post
- **sms** - SMS supported by Twilio
- **twitter\_dm** - Twitter direct message
- **twitter\_status** - public mention on Twitter
- **twilio-whatsapp** - WhatsApp message
- **chat** - web chatbot widget

**Caution** : Ensure that you properly define all of the conditions in the Unified Messaging channel so that a process exists for each social messaging platform that handles all incoming messages during runtime.
