LUIS List entity

我的梦境 提交于 2019-12-01 12:32:32

问题


I am using "list" entity. However, I do not achieve my expected result.

Here is what I have for LUIS intent:

  • getAnimal

    • I want to get a cat**[animal]**.

Here is what I have with LUIS entities:

List Entities [animal]

  • cat: russian blue, persian cat, british shorthair
  • dog: bulldog, german shepard, beagle
  • rabbit: holland lop, american fuzzy lop, florida white

Here is what I have with LUIS Phrase lists:

Phrase lists [animal_phrase]

  • cat, russian blue, persian cat, british shorthair, dog, bulldog, german shepard, beagle, etc

Desired: When user enters "I want to get a beagle." It will be match with "getAnimal" intent.

Actual: When user enters "I want to get a beagle." It will be match with "None" intent.

Please help. Your help will be appreciated.


回答1:


So using a phrase list is a good way to start, however you need to make sure you provide enough data for LUIS to be able to learn the intents as well as the entities separate from the phrase list. Most likely you need to add more utterances.

Additionally, if your end goal is to have LUIS recognize the getAnimal intent, I would do away with the list entity, and instead use a simple entity to take advantage of LUIS's machine learning, and do so in combination with a phrase list to boost the signal to what an animal may look like.

As the documentation on phrase lists states,

Features help LUIS recognize both intents and entities, but features are not intents or entities themselves. Instead, features might provide examples of related terms.

--Features, in machine learning, being a distinguishing trait or attribute of data that your system observes, and what you add to a group/class when using a phrase list


Start by

1. Creating a simple entity called Animal


2. Add more utterances to your getAnimal intent.

Following best practices outlined here, you should include at least 15 utterances per intent. Make sure to include plenty of examples of the Animal entity. 3. Be mindful to include variation in your utterances that are valuable to LUIS's learning (different word order, tense, grammatical correctness, length of utterance and entities themselves). Highly recommend reading this StackOverflow answer I wrote on how to build your app properly get accurate entity detection if you want more elaboration.

above blue highlighted words are tokens labeled to the simple Animal entity


3. Use a phrase list.

Be sure to include values that are not just 1 word long, but 2, 3, and 4 words long in length, as different animal names may possibly be that long in length (e.g. cavalier king charles spaniel, irish setter, english springer spaniel, etc.) I also included 40 animal breed names. Don't be shy about adding Related Values suggested to you into your phrase list.


After training your app to update it with your changes, prosper!

Below "I want a beagle" reaches the proper intent. LUIS will even be able to detect animals that were not entered in the app in entity extraction.



来源:https://stackoverflow.com/questions/52752218/luis-list-entity

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!