Out of Vocabulary Entity

In Snips we have developed some features to allow your vocabulary to be more flexible and recognize words that have not been set explicitly. When enabled and set accurately they can create a better user experience when using the voice assistant. Concretely, Snips has developed:

You will find these features on the slot type view of one of your defined intents of your app in the Snips Console. To get there, select an app and then an intent. On the intent view, if you have slots defined you can click on your slot to be directed to the slot type view.

Click on the defined slot to get to the slot type view.

Once you are in the slot type view you will find Automatically Extensible and Matching Strictness on the top of the view.

Top menu to set out of vocabulary entity features.

Automatically Extensible

The NLU engine can tag words as being a slot even if the word is not one of the slot values of the slot type. To do so you have to explicitly enable it on the console. If, on the other hand, you don't make use of this option a process will simply filter out any tag of a word that isn't in the list of slot values of the slot.

Expanding a bit more on what has been previously said. When automatically extensible entities is...

  • Disabled: you can guaranty that only values present in the slot type will be sent to the action code. The developer don't need to worry about unexpected slot values.

  • Enabled: any word can be tagged as the given slot. The NLU will rely on the context to decide wether or not to tag it.

Matching Strictness

In some cases you can have slot values containing several words e.g. "apple pie", "Game of Thrones", etc.. In those cases the ASR could miss a word or the user could formulate the set of words a bit differently. For instance, the user could say "pie" instead of "apple pie" or "Game Thrones" instead of "Game of Thrones". For those scenarios you may want your voice assistant to still be able to recognize the original slot value. That's where the matching strictness (partial entity) comes into play.

Matching strictness is composed of 6 different levels of strictness (from left to right): 50%, 60%, 70%, 80%, 90% and 100%.

The strictness defines the minimum required percentage of words in the slot matching the original slot value. For instance, let's say you have a slot value with 10 words and 90% strictness, then the slot will be matched only if there is at least 9 words corresponding to the original slot value.

Another important feature is that the NLU will automatically resolve the partial slots (such as "pie") to the original slot value ("apple pie"). So with a 50% strictness "pie" will be resolved as "apple pie".

You can always find the non resolved slot in the raw value field of the NLU response.

These are the important points to have in mind when using matching strictness:

  • 6 available levels [50%, 60%, 70%, 80%, 90%, 100%].

  • The percentage is per word. This means that, for instance, 90% is 9 words over 10.

  • When matched, the slot will be resolved to it's original slot value.

Side effects

The matching strictness feature can create ambiguity if you have two slot values that are just differing by a few words. With a strictness at 50% and having slot values as "apple pie" and "pear pie", the word "pie" will be tagged and resolved as one of the two slot values without guaranty of which one it will be resolved too.

The current behaviour is to resolve to the first matching value in the list but this behaviour could change