Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
984 views
in Technique[技术] by (71.8m points)

azure - LUIS List entity

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.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

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.

enter image description here 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.

enter image description here


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.

enter image description here


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...