Creating topics in text predictions
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.
- Open the text prediction:
- In the navigation pane of App Studio, click Channels.
- In the Current channel interfaces section, click the icon that represents a channel for which you want to configure the text prediction.
- On the channel configuration page, click the Behavior tab, and then click Open text prediction.
- In the Prediction workspace, click .
- 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.
- Click Create topic.
- In the Topic name field, enter a name for your
For example: book ticket cancel ticket reschedule booking
- 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.
- To train the model by using machine learning, perform the following
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.
- On the Machine learning tab, click Add training data.
- In the Text window, enter a text sample to use as
training data for the topic model, and then click
Result: The text sample is added to the list of pending training data.
- Add multiple training data by repeating steps 7.a and 7.b.
- 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
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.
For an example of topic configuration using machine learning, see the following video:
- To train the model by providing topic-specific keywords, perform the following
- In the New topic window, click Keywords.
- 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.
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.
- 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.
- In the prediction workspace, click Save to save your changes.
Previous topic Analyzing messages with text predictions Next topic Importing topics to text predictions