Test widget
The Tovie NLP test widget allows testing the recognition of intents and entities in phrases. To launch the test widget, navigate to Tovie NLP → Intents or Tovie NLP → Entities, then click Test in the bottom right corner. Enter the phrase you want to test and press Enter.
Intents
The testing output shows the list of all intents recognized in the phrase. Each intent corresponds to a score value from 0 to 1 — the level of confidence Tovie NLP has that the phrase is matched by it.
-
If there are patterns among the intent training phrases, the score is calculated independently for phrases and patterns, and then whichever is the highest is selected.
-
If you use pattern weight modification using the
$weight
element, an intent score can turn out to be greater than 1.
If a request sent to the bot matches several intents, only one of them is triggered in the script. By default, this is the intent with the highest score.
$context.nBest
and the selectNLUResult
handler to do this.Slots
Intents can contain slots — entities which must be mentioned in the user request so that the intent can be fully recognized. The process of clarifying these entities is called slot filling.
If an intent which contains slots is recognized in the test input, a icon appears next to this intent. Clicking on it expands the list of all extracted slots and the corresponding entity values.
Classification rules
Any intent can be assigned classification rules — extra conditions under which it can be recognized. For each recognized intent, the test widget shows whether the rules are configured, and if so, whether they are fulfilled:
No rules are configured | Rules are not fulfilled | Rules are fulfilled |
---|---|---|
Select the icon showing the rule fulfillment result to see in detail which rules are fulfilled and which of them are not. The intent will be recognized in the dialog only when all rules are fulfilled.
Training phrase alignment
The triggered intents can also have a icon next to them. It opens a word-by-word alignment of the request phrase to the intent training phrase which matches it most closely. Knowing this can help better understand why a particular intent was triggered.
Select a word in a phrase to view the results of its processing:
- norm — normalized word representation.
- lemma — the dictionary form of the word (lemma).
- weight — word weight.
- POS — part of speech.
- punct — whether the word is a punctuation mark.
- pattern — whether the word is a pattern.
- type — the type of the rule used for alignment.
- inSeqNum — the number of the alignment in the sequence. If two words in a row are aligned, then this value equals 2, etc.
- input aligned weight — it is calculated as the product of the word weight, the sequence weight and the alignment type weight.
Entities
The testing output shows the list of all entities recognized in the phrase. Each entity has a string or a JSON value representing the data contained by the entity. System entities have a predetermined data format, but for your own entities, you can configure the reference data yourself.