How to use LUIS None Intent in c# without train utterance at LUIS

1.8k views Asked by At

I have implemented the None Intent as follows..

[LuisIntent("None")]
public async Task None(IDialogContext context, LuisResult result)
{
      await context.PostAsync("I'm sorry. I didn't understand you.");
      context.Wait(MessageReceived);            
}

But looks like i need to train some utterance at luis side, which i don't want. I am looking something whichever is not found or recognize at luis, should fire the None Intent handler. How do I achieve this ?

1

There are 1 answers

1
Ezequiel Jadib On BEST ANSWER

Add also the following line to your None method:

[LuisIntent("")]

If Luis cannot recognize an intent, will return an empty string and so your BOT will be able to handle it.

The None intent is still useful though; imagine an scenario where LUIS recognize an intent but that recognition for some reason is wrong? In that case, you will want to set that utterance as None and then retrain.