2

I am creating a multi-dialog chatbot with Microsoft bot framework using node.js bot is connecting with LUIS for NLP. when the intent is matching dialog is triggering without any issues. but when it comes to a none matching dialog I want to trigger this Sorry, I don't know. :( this is the default dialog message. my code is as below and it is not working as expected for none matching intents.

I noted that every time I typed a word phrase which is not matched to any of the intents it triggers the previously matched intent dialog.

I don't know what's wrong with this code. I followed the below solutions but none work for me

solution 01

solution 02

solution 03

const bot = new builder.UniversalBot(new builder.ChatConnector({
        appId: process.env.MicrosoftAppId,
        appPassword: process.env.MicrosoftAppPassword
    }));

 bot.dialog(vacanciesDialog1.id, vacanciesDialog1.waterfall).triggerAction({ matches: vacanciesDialog1.name });
    bot.dialog(gratuityDialog.id, gratuityDialog.waterfall).triggerAction({ matches: gratuityDialog.name });
    bot.dialog(slipsDialog.id, slipsDialog.waterfall).triggerAction({ matches: slipsDialog.name });

default dialog as following if any dialog is not matched

bot.dialog('/', [
        (session, args, next) => {
            session.send(`Sorry, I don't know. :( this is the default dialog`);
        }
    ])
Roledenez
  • 751
  • 4
  • 16
  • 43
  • Possible duplicate of [Training None Intent in LUIS](https://stackoverflow.com/questions/46116260/training-none-intent-in-luis) – Corina Jul 19 '18 at 21:52

1 Answers1

0

You might need to train your None intent.

I created a simple LUIS app in an attempt to repro your problem. When I first deployed my bot, most of my intents were going to 'Cancel', rather than 'None'. After I added a few 'None' utterances, this problem went away for me.

Please take a look at this related StackOverflow question.

[EDIT] I wanted to elaborate a little further. I got the None intent to work by formatting my code like this:

bot.dialog('/', function (session, args) {
    session.send(`Sorry, I don't know. :( this is the default dialog.`, session.message.text);
}).triggerAction({
    matches: 'None'
});

Then, once I added a few None utterances on LUIS, I did another publish to make sure the changes went through. Hopefully this helps.

Community
  • 1
  • 1
Corina
  • 844
  • 7
  • 15
  • This does not work for me. I did try this referring my solution 02 link. https://stackoverflow.com/questions/43749505/unable-to-match-none-intent-with-triggeractions – Roledenez Jul 23 '18 at 14:15
  • if this worked for you, could you able to publish the project and luis model to git hub? – Roledenez Jul 23 '18 at 14:25
  • Sorry for the delay. Here's my code: https://github.com/corinagum/v-corgum-B-51399857-src Feel free to share your code and I can take a look to help. – Corina Jul 24 '18 at 20:29