1
votes

I am facing an issue whereby words that does not match with any intents, it will assume it belongs to intent with the most labeled utterances.

Example: if

  • Intent A consists of utterances such as Animals
  • Intent B consists of utterances such as Fruits
  • Intent C consists of utterances such as Insects
  • Intent D consists of utterances such as People Name

Desired: If the random word(s) does not fit into any of the luis intent, it will fit into none luis intent. Example of desired: If word such as "emotions" or "clothes" were entered, it will match as "None" intent.

Actual: When user type random word(s), it match with luis intent with highest number of labeled utterances. If word such as "emotions" was entered, it will match as "A" intent as intent A consist of highest number of labeled utterances.

Please advise on the issue.

enter image description here

2
Could you provide some samples and desired results to make your question more clear?Ferdinand Fejskid
@FerdinandFejskid, as shown in the image above, whenever I have typed something irrelevant to any intents, it will match as intent "A".GuessssMe
do I get it right that you are testing words instead of sentences?Ferdinand Fejskid
@FerdinandFejskid yesGuessssMe
Do you have defined entities for each Intent? If so are they List-entity? If so does the list contain all possible values? Or the solution is different?Ferdinand Fejskid

2 Answers

1
votes

Set a score threshold, below which your app won't show any response to the user (or could show a "sorry I didn't get you" message instead). This avoid responding to users with anything LUIS is unsure about, which usually takes care of a lot of "off topic" input too.

I would suggest setting it your threshold between 0.3 and 0.7, depending on the seriousness of your subject matter. This is not a configuration option in LUIS, rather in your code you just do:

if(result.score >=0.5) { 
    // show response based on intent.
} else { 
    // ask user to rephrase
}

On a separate note, it looks like your intents are very imbalanced. You want to try and have roughly the same number of utterances for each intent, between 10 and 20 ideally.

0
votes

So without more details on how you've built your language model, most likely the underlying issue is that you either don't have enough utterances in each intent that have enough variation displaying the different ways in which different utterances could be said for that particular intent.

And by variation I mean different lengths of the utterance (word count), different word order, tenses, grammatical correctness, etc. (docs here)

And remember each intent should have at least 15 utterances.

Also, as stated in best practices, do did you also make sure to include example utterances in your None intent as well? Best practices state that you should have 1 utterances in None for every 10 utterances in the other parts of your app.

Ultimately: build your app so that your intents are distinct enough with varying example utterances built into the intent, so that when you test other utterances LUIS will be more likely able to match to your distinct intents--and if you enter an utterance that doesn't follow any sort of pattern or context of your distinct intents, LUIS will know to detect the utterance to your fallback "None" intent.

If you want more specific help, please post the JSON of your language model.