Skip to content
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.
Phrase_List.json Moving from Microsoft/LUIS-Samples (#1) Dec 11, 2018

Phrase List:

The Phrase list feature can help your model by providing semantically related words to the values provided. After selecting the related words and setting the list to active, it will help your model in its predicting of intents and entities. Marking the values of an Phrase list as exchangable will tell LUIS to treat the words as synonyms.

Example Use Case: Using Phrase Lists for Synonyms

A user tells the chatbot, "I require a computer replacement". The "Hardware" intent has been trained with the labeled utterance "I want a computer replacement". The difference between the two utterances is only one word, "require", which is a synonym of the original word "want". What is the scoring of user's utterance?

"I require a computer replacement" before Phrase list

It's score was 0.840912044, which is low when considering that "require" and "want" are synonyms. For "I want a computer replacement", the "Hardware" intent score was 0.98. Additionally, there are no predicted entities for the user's utterance, though "computer" was labeled as a "Hardware" entity in "I want a computer replacement".

Why is "I require a computer replacement" score lower than the labeled utterance that uses the word "want"? The answer for this is that LUIS provides syntactic analysis which analyzes utterances based on its grammatical structure. Since the word "require" wasn't used in any labeled utterances for the "Hardware" intent, the score was lower than 0.98. Syntactic analysis is often compared with semantic analysis, which includes an analysis of the word's definitions or meanings (e.g. perspiration == sweat).

Creating a Phrase list feature can add some semantic anaylsis to the LUIS model. Phrase lists are found under Features. After selecting Features, select Add Phrase list, then provide a name and a starting value.

Initializing the "Want" Phrase list

After you provide a starting value, LUIS will provide a series of Related Values which feature words similar to the values already existing in your Phrase list.

Related values to the initial value "Want"

Adding the words "Require", "Requires" and some of the recommended related values will have the Phrase list ready to be incorporated into your model. As mentioned earlier, we've set "isExchangable" and "isActive" to true. The first property will treat the contents of the list as synonyms and the second property will tell LUIS to use the Feature when recognizing utterances.

Addings values to the "Want" Phrase list

In the example LUIS Application we have trained our model with no utterances that include the word "require". What we have done is create a Phrase List that has the word "want" along with "require" and other synonyms.

After saving the Phrase list, training and republishing the model we then test the utterance "I require a computer replacement".

"I require a computer replacement" after Phrase list

After activating the Phrase list the score respectably increased to 0.8994222 from 0.840912044. Additionally, the word "computer" was correctly recognized as a "Hardware" entity.

The model used in this example can be found here. Additional reading on LUIS Features can be found here.

You can’t perform that action at this time.