4

I've gone through the ocumentation and tried understanding the Phrase List feature. Although I'm sure of the purpose of the Phrase List feature, I couldn't quite get the purpose of the "interchangable" option intutively.

interchangable

Any thorough explanation would be appreciated.

Nicolas R
  • 13,812
  • 2
  • 28
  • 57
Srichakradhar
  • 1,535
  • 1
  • 12
  • 24

2 Answers2

3

@Srichakradhar at your suggestion, posting answer related to your question on gitter to here on StackOverflow as well to benefit the community as a whole!:

"...regarding your question on phrase lists, happy to speak high-levelly on what the feature does :)

@srichakradhar So ultimately the goal with LUIS is to understand the meaning of the user’s input (utterance), and through calculations, it returns to you the value of how confident it is about the meaning of the input. Using phrase lists is one of the ways to improve the accuracy of determining the meaning of the user’s utterance —more specifically, when adding features to a phrase list, it can put more weight on the score of an intent or entity.

Using a couple of examples to illustrate the high-level concept of how features help determine intent/entity score, and in turn predict the user’s utterance’s meaning:

For example, if I wanted to describe a class called Tablet, features I could use to describe it could include screen, size, battery, color, etc. If an utterance mentions any of the features, it’ll add points/weight to the score of predicting that the utterance’s meaning is describing Tablet. However, features that would be good to include in a phrase list are words that are maybe foreign, proprietary, or perhaps just rare. For example, maybe I would add, “SurfacePro”, “iPad”, or “Wugz” (a made-up tablet brand) to the phrase list of Tablet. Then if a user’s utterance includes “Wugz”, more points/weight would be put onto predicting that Tablet is the right entity to an utterance.

Or maybe the intent is Book.Flight and features include “Book”, “Flight”, “Cairo”, “Seattle”, etc. And the utterance is “Book me a flight to Cairo”, points/weight towards the score of Book.Flight intent would be added for “Book”, “flight”, “Cairo”.

Now, regarding interchangeable vs. non-interchangeable phrase lists. Maybe I had a Cities phrase list that included “Seattle”, “Cairo”, “L.A.”, etc. I would make sure that the phrase list is non-interchangeable, because it would indicate that yes “Seattle” and “Cairo” are somehow similar to one-another, however they are not synonyms—I can’t use them interchangeably or rather one in place of the other. (“book flight to Cairo” is different from “book flight to Seattle”) But if I had a phrase list of Coffee that included features “Coffee”, “Starbucks”, “Joe”, and marked the list as interchangeable, I’m specifying that the features in the list are interchangeable. (“I’d like a cup of coffee” means the same as “I’d like a cup of Joe”)

For more on Phrase Lists - Phrase List features in LUIS

For more on improving prediction - Tutorial: Add phrase list to improve predictions"

Zeryth
  • 1,204
  • 1
  • 7
  • 15
2

Taken from documentation (here):

A phrase list may be interchangeable or non-interchangeable. An interchangeable phrase list is for values that are synonyms, and a non-interchangeable phrase list is intended for values that aren't synonyms but are similar in another way.

There is also a great reply here on MSDN:

Choose "Exchangeable" when the list of words or phases in your feature form a class or group -- for example, months like "January", "February", "March"; or names like "John", "Mary", "Frank". These features are "exchangeable" in the sense that an utterance where one word/phrase appears would be labeled similarly if the word/phrase were exchanged with another. For example, if "show the calendar for January" has the same intent as "show the calendar for February", this suggests choosing "exchangeable".

Choose "Not exchangeable" for words/phrases that are useful in your domain, but which do not form a class or group. For example, the words "calendar", "email", "show", and "send" might be relevant to your domain, but might all be associated with different intents, like "show my calendar" or "send an email".

If you're not sure, you can try either and see if there's any difference in performance.

Nicolas R
  • 13,812
  • 2
  • 28
  • 57