Skip to main content

Creating a chatbot channel

5 Tasks

15 mins

Visible to: All users
Beginner Pega Customer Decision Hub 8.8 English
Verify the version tags to ensure you are consuming the intended content or, complete the latest version.

Scenario

U+ Air wants to use a chatbot to handle ticket cancellation requests through all relevant channels to reduce the workload of customer service representatives. The airline first wants to open a chatbot channel to allow their customers to cancel their ticket through a chatbot as an initial step.

As an application developer, create a Digital Messaging channel to implement the chatbot. Then, as a data scientist, use a dataset to train the generated text prediction so that the chatbot correctly recognizes the 'cancel ticket' topic.

Use the following credentials to log in to the exercise system:

Role User name Password
Application Developer ApplicationDeveloper rules
Data Scientist DataScientist rules
Caution: This challenge requires specific artifacts. Ensure that you click Initialize (Launch) Pega instance for this challenge to get the correct exercise system.


Your assignment consists of the following tasks:

Task 1: Create a new digital messaging channel

As an application developer, create a new Digital Messaging channel to respond to service requests received through the U+ Airline chatbot.

Task 2: Test the chatbot

As a data scientist, test the chatbot before training the topic model to observe the current behavior.

Task 3: Train the topic model

Use the Airlines Training Data file that contains classified messages to train a new topic model on three airline-related topics.

Task 4: Test the text prediction

Confirm that the new topic is predicted.

Task 5: Test the U+ Air chatbot

As an application developer, test the topic detection, and then observe the results.

 

You must initiate your own Pega instance to complete this Challenge.

Initialization may take up to 5 minutes so please be patient.

Challenge Walkthrough

Detailed Tasks

1 Create a new digital messaging channel

  1. On the exercise system landing page, click Pega CRM suite to log in to App Studio.
  2. Log in to App Studio as an application developer:
    1. In the User name field, enter ApplicationDeveloper.
    2. In the Password field, enter rules.
  3. In the navigation pane of App Studio, click Channels to create a new channel interface for Digital Messaging.
  4. In the Create new channel interface section, click Digital Messaging to create a channel.
    channels
  5. In the Configuration tab, in the Details section, complete the details:
    1. In the Channel interface name field, enter Airline.
    2. In the Description text box, enter U+ Air Digital Messaging.
      digital messaging 2
  6. In the Content section, click Add case type.
    1. In the Create command dialog box, in the Case type list, select Cancel a ticket.
      Note: A System Architect already created the Cancel a ticket case type. The case manages ticket cancellations once they are routed to the correct workbasket.
    2. In the Create case command field, enter cancel ticket to enable the chatbot to run the case type after detecting the topic of the message.
      create command
      Note: The cancel ticket create case command represents the name of the topic that the data scientist creates later in the challenge.
    3. Click Submit to create the command.
  1. In the Digital Messaging channel, click the Connection tab.
  2. In the Set up section, configure the migration details:
    1. In the Template Operator field, enter or select ApplicationDeveloper.
    2. In the Base URL field, enter https://env-xxxx.pegaenablement.com.
      Caution: For the Base URL, replace XXXX with the value that is specific to your exercise environment. You can copy this from the URL that is displayed in your browser.
      set up window
      Note: It is necessary to complete this step to properly migrate the channel information to the prediction that is automatically created in Prediction Studio.
  1. In the upper-right corner, click Save to save the new channel.

2 Test the chatbot

  1. In the Digital Messaging channel, click the Configuration tab.
  2. In the Preview console on the right, in the Type your message here text box, enter hello! to see if the chatbot detects the message and responds.
  3. Turn on the Show analysis switch to see the details.
    preview console
     
    Note: The chatbot detects the #greeting topic with 97% confidence. The chatbot is trained to detect simple topics out of the box.
  1. In the Type your message here text box, enter I want to cancel my ticket.
     
    bot 1
    Note: At this point, the text prediction model is not built. The chatbot cannot identify the topic of this message.
  1. In the lower-left corner, click the user icon, and then select Log off to log out of App Studio.

3 Train the topic model

  1. On the exercise system landing page, click Pega CRM suite to log in to Prediction Studio.
  2. Log in to Prediction Studio as a data scientist:
    1. In the User name field, enter DataScientist.
    2. In the Password field, enter rules.
  3. On the Predictions landing page, click Airline to open the prediction workspace.
    ariline tile 2
  4. Download the Airlines_training_data.xlsx file.
  5. Open Airlines_training_data.xlsx to inspect it.
    1. Inspect the content column.
    2. Inspect the result column, and then confirm that the training dataset contains three topics:
      • action > book ticket
      • action > cancel ticket
      • action > reschedule.
        excel
    3. Close the file.
  6. In the Airline prediction workspace, in the Topics section, click Import to upload topic information.
    topis import
  7. In the Upload topics dialog box, click Choose file, select Airlines_training_data.xslx file, and then click Open.
  8. Click Upload.
  9. After the upload, confirm that the three new topics have pending training data.
    pending data
  10. In the upper-right corner of the Airline prediction workspace, click Build to build topic models.
  11. In the Build models dialog box, select the Airline row.
    airline row
  12. Click Build to build the models.
    Note: The building process might take up to few minutes.
  1. After two minutes, in the upper-right corner of the prediction window, click Actions > Refresh.
  2. Once the build is completed, in the top of the prediction window, click View report.
    1. In the Model training report window, review the result.
    2. Click Close to close the Model training report window.

4 Test the text prediction

  1. In the upper-right corner of the Airline prediction workspace, click Test.
    1. In the Test prediction dialog box, in the text box, enter I want to cancel my ticket.
    2. Click Test.
    3. Observe that cancel ticket topic is detected with a confidence score of 0.82
      topic menu
      Note: The prediction also detects Others as topic of the message. This result is expected behavior, because both Airline and pySmallTalk models are run on the text. However, the system is configured in such a way that, if pySmallTalk model detects the Others topic, the system uses the Airline business model, even if the Confidence score of the pySmallTalk model is higher.
    4. Close the Test prediction dialog box.
  1. In the lower-left corner, click the user icon, and then select Log off to log out of Prediction Studio.

5 Test the U+ Air chatbot

  1. Login to App Studio as an application developer:
    1. In the User name field, enter ApplicationDeveloper.
    2. In the Password field, enter rules.
  2. In the navigation pane of App Studio, click Channels to view the list of current channels.
  3. In the Current channel interfaces section, click the icon that represents your existing Airline Digital Messaging channel.
    airline channel
  4. In the Preview console on the right, in the Type your message here text box, enter I want to cancel my ticket. to test the chatbot.
  5. Turn on the Show analysis switch to show the details.
  6. Confirm that the chatbot detects a cancel ticket topic and runs a preconfigured Cancel a ticket case type.
    bot 3
  7. Click Yes to confirm.
    bot 4

This Challenge is to practice what you learned in the following Module:


Available in the following mission:

If you are having problems with your training, please review the Pega Academy Support FAQs.

Did you find this content helpful?

Want to help us improve this content?

We'd prefer it if you saw us at our best.

Pega Academy has detected you are using a browser which may prevent you from experiencing the site as intended. To improve your experience, please update your browser.

Close Deprecation Notice