LUIS Intent not returning the entire value of the entity with space

半城伤御伤魂 提交于 2019-12-01 06:25:01

Your LUIS app essentially needs more utterances of how that entity can occur.

I would say stategy 1.) is probably the most useful, but list other options you may include as well to help with your entity detection.


  1. Add more utterances with valuable variations of the vf_NARCName entity

As stated in the First Tutorial in the documentation under "Build App" section, make sure that you include:

  • At least 15 utterances per intent, and within that include different ways of how the entity can appear

and the variations you should be conscious to include are:

  • differences in word order (where the entity can occur within an utterance)
  • tense (like "was", "is", "will be", as shown in this tutorial)
  • grammatical correctness
  • length of both the utterance and of the entity itself (word count)

The last bit is probably one that you should include more examples of. So check your utterances that contain vf_NARCName entities that are of not just 1 word in length, but 2 or 3 or maybe even longer if that's a possibility in your app.


  1. Adding a Phrase List

As docs describing what Phrase Lists are state,

A phrase list includes a group of values (words or phrases) that belong to the same class and must be treated similarly

This is another way you could help send another signal to LUIS to help detect your vf_NARCName entity.

Tutorial on how to add Phrase List here.


  1. Lastly, you may want to look into using Pattern.any

As the Pattern.any docs state here,

use the pattern.any entity to extract data from utterances where the utterances are well-formatted and where the end of the data may be easily confused with the remaining words of the utterance

So if you know that you may have potential vf_NARCName entities that are extremely long in word count for the entity itself, you may benefit from using Pattern.any entity.

For example maybe you had "The Department of People Who like Really Long Names, But Hate Novels" as a vf_NARCName entity. LUIS may have a hard time determining where exactly that entity ends, but can do so with the use of Pattern.any.

It seems like a problem with the amount and type of the training data. You have to provide enough samples for LUIS to be able to understand that the value of the vf_NARCName can be composed of a single word or a series of words.

In this case I would advise you to try to set up a phrase list, something like "CompanyNames" and give some diversified examples, like "Animal Dermatology Service", "Animal Dermatology" and other real examples of customer names that might be submitted to your bot in production.

You can read more about Phrase Lists here: https://docs.microsoft.com/en-us/azure/cognitive-services/luis/luis-how-to-add-features

I had this same problem in the past, and two things were able to help, A LOT of training data, and phrase lists.

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