Rules for standard topics
Topics use rules to find feedback content. Various rule components, rule groups, and rule segments enable highly customized topics.
A standard topic rule is the combination of logic and words (including keywords, nearby words, and linguistic connections) that define which phrases are associated with a particular topic.
Rule components
These standard topic rule components are used to create and modify rules.
|
Component |
Description |
|---|---|
|
Keywords | Finds feedback that contains the keyword. Only one keyword is permitted in a keyword field. Note: Single words, word groups, and user features are treated like keywords in Experience Cloud.
Tip: Add not_ to the beginning of any keyword to specify its negated forms. This feature works for both verbs (not_sleep brings back didn't sleep, couldn't sleep) and nouns (not_available brings back not available).
Example: |
|
CONNECTED TO |
Finds two keywords that are syntactically related. Example: The feedback, "I was assisted by a friendly representative," would be considered a match for this rule because friendly modifies the word representative. |
|
NEAR |
Finds two or more words within a certain window of a single sentence. These options appear when you choose the NEAR component: Ordered — Text Analytics checks that the words are in the correct order before analyzing whether to tag a piece of feedback. Unordered — Text Analytics does not consider the order of the words when analyzing whether to tag a piece of feedback. Example: The feedback, "Overall I liked your product and your service" would be tagged because the words like and product are in the correct order and within three words of each other. The feedback, "The product was great, though I didn't like the service" would not be tagged because it fails to meet all the conditions of the rule. |
|
AND Logic |
Finds feedback with all of the keywords. For a piece of feedback to match the topic, the topic must include the keyword to the left and right of the AND. Example: The feedback, "It was a busy department and the woman that ended up helping us brought out some shoes in different varieties that I did not ask for" would be tagged. The feedback, "Bought shoes, a purse and 3 men's shirts. 3 departments, all staff helpful, in and out in 30 minutes. I like Orion's." would not be tagged, since "shoes" and "departments" are in separate sentences. |
|
NOT Logic |
Excludes feedback that contains certain keywords, nearby words, or linguistic connections. The NOT component applies only to that specific rule. Comments that match the rule AND contain the NOT rule in the same sentence are excluded. A comment containing a match for the NOT rule in the same comment but not the same sentence as the rule match is still included. |
|
OR Logic |
Finds feedback containing the keyword to the left or right of the OR (both keywords do not need to be present for the topic to be tagged). The OR option appears when you add a NOT component. Add components to the OR rule section if the topic should be tagged even when only one of the keywords is present. Example Tip: The OR connector appears in the screen as a dropdown option only when adding a NOT component. However, the pipe character (|) may be used to create an OR connector in any text field to create separate rules with each word. For example, creating a rule with the keyword shoes|socks|sandals creates three separate rules, one each for shoes, socks, and sandals.
|
This figure shows an example of how to use rule components to create rules:
Create standard topic rules
-
Use the Topic Set dropdown to select a topic set on the Topics screen.
-
Expand a parent topic, then select a subtopic and click Edit. The Edit topic screen displays.
-
If there are no topics on the Topics screen, or if parent topics do not have subtopics, create them as described in Create topics.
-
-
Optionally, use the dropdown filters to select a specific Language and/or topic rule Segment to apply to the rule.
For information about creating and using topic rule segments, see Topic segments.
-
Click Add Topic Rule.
-
Define the new rule using words, user features, word groups, and connection logic operators. For more information, see Rule components and How rules are applied.
To create one rule that applies to multiple keywords, see Word groups for standard topics.
-
Optionally for any keyword, click
Word match and then select how to match the keyword to comments.
Restriction: This feature is inactive by default. Ask your Medallia expert to file a Feature activation request with Medallia Support.By default, all keywords use lemmatized matches. For more information, see Word matching for standard topics.
Tip: The OR connector appears in the screen as a dropdown option only when adding a NOT component. However, the pipe character (|) may be used to create an OR connector in any text field to create separate rules with each word. For example, creating a rule with the keyword shoes|socks|sandals creates three separate rules, one each for shoes, socks, and sandals. -
Click Add.
The new rule is created, and appears in the list of rules for the topic. In some cases, an informational message appears next to a rule component, suggesting that you change the component to improve the rule.
Use your judgment to decide whether to follow the suggestion.
-
In the Preview panel, read some of the comments captured by the new rule to verify you are capturing the phrases you intended to capture.
You can organize rules for standard topics into categories called rule groups. Rule groups help organize the topic and allow you to efficiently manipulate multiple rules at once.
To add one or more rules to a rule group, select rules and then click Group. In the dropdown, select whether you want to add the selected rules to an existing group (Cleanliness, Disaster, and Tidiness in the following image), or create a new group with the selected rules by entering a new Group Name.
How rules are applied
For standard topics, Text Analytics rules tag feedback at the phrase level. For each rule, Text Analytics splits comments into multiple phrases, then applies the rule to each phrase. For example, in English, Text Analytics defines a phrase by detecting these sentence boundaries: ., !, ?, ;, _, ..., …. Phrases with 17 words or more are further split according to the following words and pairs of words:
- but
- though
- although
- except
- albeit
- despite
- however
- otherwise
- whereas
- nevertheless
- rather than
- other than
- aside from
- apart from
For example, imagine that you create a rule with the intention of including feedback with the word store and excluding feedback with the word machine. This rule is expressed with the syntax, store NOT machine. You then receive the following feedback: The machine goes down quite often in the store. When this happens, we get a lot of store customers yelling at the reps because they can't understand them.
In this example, the first phrase of the feedback (The machine goes down...) is not tagged by the rule because while it includes the word store, it also includes the word machine. The second phrase (We also get a lot of store customers yelling...) is tagged by the rule because includes the word store and does not include the word machine.
During parsing, Text Analytics divides comments into a maximum of 256 phrases based on sentence and stop word boundaries. Any comment text that exceeds this maximum is concatenated into the final phrase, up to the maximum number of characters configured for comment processing in Tag pool settings.
Individual phrases are limited to a maximum of 5000 characters. A typical phrase does not exceed this limit, but for very long comments, a concatenated phrase may exceed 5000 characters.
When a phrase exceeds the 5000 character limit, Text Analytics processing--including topic and sentiment tagging--is halted, and the record has the status TAGGING_FAILED. Reprocessing the record has the same result. If Sensitive Data rules are enabled for the comment field, the comment field remains masked in the data record.
Test and troubleshoot rules with the Preview panel
In the preview panel, you can read some of the comments captured by all rules and verify that they are capturing the phrases you intended to capture.
Where:
-
Preview dropdown — Change the side panel view to the Topic Definition, User Features list, Word Groups list, Segments, or Topic Notes.
-
Sync comment matches — Update the preview panel's match results with new comments.
-
Dataset Size — Select the size of the record dataset to populate the preview. A larger dataset may cause the preview to load more slowly, while a smaller dataset can speed up the loading time.
-
Number of comments — Shows the total number of comments submitted. Roles and restrictions are not considered in this count, so the number shown in brackets may differ from the number of comments visible to the user.
-
Marked comments Yes / No — Help you track on which comments are accurate and inaccurate.
Based on the number of inaccurate phrases, you can then decide whether it is necessary to modify or create new rules. As you read and validate comments tagged by your rules, click the Yes and No buttons in the Preview panel to answer a single question: Should this comment be captured by the specific topic you are assessing? After you mark a comment, the counter at the top of the list reflects your choice. Yes answers turn green, and No answers turn red. Clicking No does not remove the comment from the topic.
Note: Yes/No annotations are retained in perpetuity, subject to the preview component's data retention maximum of 1 million records.To help you understand whether to mark comments as accurate, consider the following example comments captured by a Shoe Department topic with a rule defined as find CONNECTED TO shoe:
The only issue I had was that I had bad luck in finding a shoe in my size that I really liked. The two pairs that I wanted, did not have them.
I liked finding shoes that were not available in the store. It is always hard to choose, however, when you can't try them on.
The first comment is accurate because the customer is describing an experience finding shoes within the store, which is relevant to the shoe department topic. The second comment, however, is inaccurate because it describes an experience buying shoes online instead of in a store. Although it is captured by one of the topic's rules, it does not fit within the scope of the shoe department topic.
Some inaccurate phrases are normal and are not an indication that something is wrong with your topic. However, it is important to monitor the percentage of records with inaccurate matches to ensure that the majority of matches are accurate.
-
Last updated date — Displays when the preview was last updated.
The Preview panel is automatically updated when you create a new rule or make any changes to the topic or rule.
Select a rule to preview total results from that single rule, and then turn on the Show unique matches property to limit the comments shown to those that match a highlighted rule only.
Thus, in the Preview panel there are 3 preview types:
-
By default you can see some of the comments captured by all rules.
-
If you select one rule, you can see the total result of comments filtered by that selected rule.
-
If you turn on the Show unique matches property, you can see the unique comment results for the selected rule.
Click Refresh to update the Preview panel with comments associated with the selected topic. Consider refreshing the comments in the following situations:
-
You have not assessed the topic for an extended period of time.
-
You added new phrases or dictionary terms (user features) to your instance.
-
You changed a rule or added a new rule that is not reflected in the rule record counts.
-
Text Analytics does not automatically update the record counts.
If you are trying to retrieve feedback with a specific word or phrase and Text Analytics is not finding any matches, a user feature might be needed to pick up the term or phrase. To determine whether a user feature is needed, you can search for the term or phrase in the Responses screen, to see whether searching for the term returns results and if the number of results it returns is higher than the number found on the topic configuration screen. For more information, see User features.
Identify a stopping point
In general, you can stop creating new rules after you've identified the main terminology customers use to discuss the topic. One way to gauge whether or not you are ready to stop creating rules is to observe how pieces of feedback you capture by adding additional keywords. Another way to gauge your stopping point is by adding a general keyword that's broadly related to your topic, looking at the unique hits for that keyword, and determining how many of those unique hits actually talk about your topic (then deleting that keyword when you are done).
If you are capturing far less feedback with each additional keyword compared to when you started, you might have reached a good stopping point. For example, if when you started creating rules, each additional keyword captured 50-100 unique pieces of feedback on average, but now each additional keyword only captures 5 unique pieces of feedback, it might be time to stop. Try to avoid creating rules for single pieces of feedback.
Reference user features in standard topic rules
User features enable topic rules and word groups to include multi-word phrases.
User features are terms that are added to the Medallia Experience Cloud dictionary because, otherwise, they would be ignored by the parser. Often, they are specific to your company and your company’s industry, such as product names, brand names, or frequently used combinations of words. Once a user feature for a word is created and the feedback is parsed, Experience Cloud can search for the exact word or phrase defined within the user feature.
When you create a rule, you can search for a user feature by adding it as a keyword. For more information, see User features.
To reference a user feature from a topic rule:
-
In Topic list, click User Features.
-
In the User Features pane, find the user feature to use and take note of its Canonical form:
-
When creating a rule, add the Canonical form as a keyword.
Note: Be mindful about usingWord match when adding user features to rules. If you select an exact match for a user feature, the rule interprets the underscore as part of the match. For example, if you create a rule with an exact match for the all_over word group, Text Analytics tags comments for the rule only when they include all_over.
