Search code examples
botframeworkazure-language-understanding

Difference between Phrase lists and list entities?


I have started working with Microsoft bot framework and LUIS. I have problem understanding difference between Phrase lists and list entities? Can you help me? Examples would be great. Thanks


Solution

  • What is a list entities?

    Definition in documentation here, I highlighted the main points

    List entities represent a fixed set of related words in your system. Each list entity may have one or more forms. They aren't machine learned, and are best used for a known set of variations on ways to represent the same concept. List entities are not labeled in utterances or trained by the system.

    A list entity is an explicitly specified list of values. Unlike other entity types, LUIS does not discover additional values for list entities during training. Therefore, each list entity forms a closed set.

    If there is more than one list entity with the same value, each entity is returned in the endpoint query.

    What is a phrase list feature?

    Definition in documentation here:

    A phrase list includes a group of values (words or phrases) that belong to the same class and must be treated similarly (for example, names of cities or products). What LUIS learns about one of them is automatically applied to the others as well. This is not a white list of matched words.

    When to use phrase lists instead of list entities

    I think the best answer is (still in the documentation, here):

    • When you use a phrase list, LUIS can still take context into account and generalize to identify items that are similar to, but not an exact match as items in a list. If you need your LUIS app to be able to generalize and identify new items in a category, it's better to use a phrase list.

    • In contrast, a list entity explicitly defines every value an entity can take, and only identifies values that match exactly. A list entity may be appropriate for an app in which all instances of an entity are known and don't change often, like the food items on a restaurant menu that changes infrequently. In a system in which you want to be able to recognize new instances of an entity, like a meeting scheduler that should recognize the names of new contacts, or an inventory app that should recognize new products, it's better to use another type of entity and then use phrase list features to help guide LUIS to recognize examples of the entity.