Skip to main content


         This documentation site is for previous versions. Visit our new documentation site for current releases.      
 

Creating topics in text predictions

Updated on July 5, 2022

Add topics to a topic model in your text prediction and train the model by providing training data or topic-specific keywords. You can then use the topics to route incoming customer conversations to the right case or to reply to queries with the appropriate message.

  1. Open the text prediction:
    1. In the navigation pane of App Studio, click Channels.
    2. In the Current channel interfaces section, click the icon that represents a channel for which you want to configure the text prediction.
    3. On the channel configuration page, click the Behavior tab, and then click Open text prediction.
  2. In the Prediction workspace, click OutcomesTopics.
  3. In the Language field, select the language for which you want to add a topic.
    Result: The change of language refreshes the list of available topics. The list now displays the topics for the selected language.
  4. Click Create topic.
  5. In the Topic name field, enter a name for your topic.
    For example: book ticketcancel ticketreschedule booking
  6. In the Model field, select the topic model to which you want to add the topic.
    Note: The pyInteractionTaxonomy model represents the default topic model that the system created automatically for your text prediction. On the Outcomes and the Models tabs, the name of that topic model is the same as the name of your text prediction. For example, for the U+ Bank customer support text prediction, the name of the default topic model is also U+ Bank customer support.
  7. To train the model by using machine learning, perform the following actions:
    Tip:

    Machine learning is a more effective method of training topic models than keywords. Keywords are Boolean matches that cannot identify the most accurate topic. Do not use keywords in production scenarios.

    1. On the Machine learning tab, click Add training data.
    2. In the Text window, enter a text sample to use as training data for the topic model, and then click Add.
      Adding training data for a topic
      Sample text added as training data: I want to cancel my ticket AE4312
      Result: The text sample is added to the list of pending training data.
    3. Add multiple training data by repeating steps 7.a and 7.b.
    4. Click each training data in the list, and then review the results of the text analysis. If necessary, select the correct topic type in the Topic field.
      Tip: The system automatically marks as reviewed the training data that you add on the Outcome tab. You can use this training data directly for model building.
      Reviewing training data for a topic
      The cancel ticket topic type is selected for the training data: I want to cancel my ticket AE4312

      For an example of topic configuration using machine learning, see the following video:

  8. To train the model by providing topic-specific keywords, perform the following actions:
    1. In the New topic window, click Keywords.
    2. Create a list of topic-specific keywords to train the model.
      You can specify the following types of keywords:
      Should words
      If any of the Should words appear in a piece of text, topic detection assigns that text to the corresponding topic. To achieve accurate results, create an exhaustive list of Should words. For example, for a Support topic, you can specify the following Should words: help, assistance, support, customer support, customer service, aid, guidance, assist, advice, and so on.
      Must words
      If all Must words appear in a piece of text, topic detection assigns that text to the corresponding topic. You can specify whether you want all Must words to appear at sentence level, or in the text as a whole. Use Must words to narrow down your topic detection conditions. For example, you can specify that a piece of text must contain the word help to be assigned to the Support parent category.
      And words
      If a piece of text contains both And words and Should words, topic detection assigns that text to the corresponding topic. Use And words to distinguish between similar categories and to increase the accuracy of topic detection. For example, you can specify the same Should words for the In-store support and Phone support topics, but then add premises, store, department store, and office as keywords specific to the In-store support topic, and phone, call, and phone call as keywords specific to Phone support.
      Not words
      If a Not word appears in a piece of text, the text is not assigned to the corresponding topic. For example, enter phone or call as words that prevent topic detection from assigning a piece of text to the In-store support topic.
      Note:

      Keywords influence the behavior of a machine learning model, but they are not exact rules. The Should, Must, and And words act as positive features for matching a text to a topic, while the Not words act as negative features. The training and testing data have the greatest impact on your machine learning model, while keywords have a smaller impact.

  9. Click Save.
    Result: The topics are added to the Topics list with pending training data. You can use this training data directly for model building.
  10. In the prediction workspace, click Save to save your changes.
What to do next: Build your models to train them with the new training data. For more information, see Building models in text predictions.

    Have a question? Get answers now.

    Visit the Support Center to ask questions, engage in discussions, share ideas, and help others.

    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.com is not optimized for Internet Explorer. For the optimal experience, please use:

    Close Deprecation Notice
    Contact us