[Question] Intent handler does not work when multiple intents have scores higher than default threshold
System Information (Required)
- SDK Language: NODE
- SDK Version: 3.8.4
- Development Environment: OTHER
Issue Description
The high scoring intent is not handled when multiple LUIS intents have their respective scores higher than the default threshold(0.1). For example, this is the LUIS response I'm receiving:
"entities": [],
"intents": [
{
"intent": "Good",
"score": 0.38138606327968266
},
{
"intent": "Not Good",
"score": 0.14239219383059437
},
{
"intent": "getInfo1",
"score": 0.058470389996233038
},
{
"intent": "getInfo3",
"score": 0.052354321946208544
},
{
"intent": "End Conversation",
"score": 0.051956717501244802
},
{
"intent": "getInfo2",
"score": 0.049671852402879912
},
{
"intent": "getInfo4",
"score": 0.04166953247839323
},
{
"intent": "getInfo5",
"score": 0.032684937293639832
},
{
"intent": "getInfo6",
"score": 0.027630602530947044
},
{
"intent": "getInfo7",
"score": 0.027075797198458249
}
],
"query": "iam good",
"topScoringIntent": {
"intent": "Good",
"score": 0.38138606327968266
}
}
I believe that the below intents are getting into some kind of conflict as they both have scores > 0.1.
I tried adding intentThreshold parameter for the triggerAction of the respective handlers. However, it is of no use.
{ "intent": "Good", "score": 0.38138606327968266 }, { "intent": "Not Good", "score": 0.14239219383059437 }
Code Example
//BOT REST end point
var server = restify.createServer(options);
server.listen(config.port,function() {
console.log('%s listening to %s', server.name, server.url);
});
var connector = new builder.ChatConnector({
appId: config.BOTFRAMEWORK_APPID,
appPassword: config.BOTFRAMEWORK_APPSECRET
});
server.post('/test', connector.listen());
var bot = new builder.UniversalBot(connector);
var recognizer = new builder.LuisRecognizer(config.model);
bot.recognizer(recognizer);
bot.dialog("/",[function(session){
if(utilities.isEmpty(session.userData.name)) {
// Greetings
builder.Prompts.text(session,prompt.greeting_text);
}else {
session.beginDialog("/beginConversation");
}
},
function(session,results){
session.userData.name = results.response;
console.log("username :"+ session.userData.name);
session.beginDialog("/beginConversation");
}]);
// beginConversation
bot.dialog("/beginConversation", function(session){
builder.Prompts.text(session,"Hello "+session.userData.name+"! "+prompt.conversation_begin_text);
});
// userGood
bot.dialog("/userGood", function(session){
session.userData.isHappy = true;
builder.Prompts.text(session,prompt.user_good_response_text+" "+prompt.address_query_text);
}).triggerAction({
matches: "Good",
intentThreshold:0.20
});
// userBad
bot.dialog("/userBad", function(session){
session.userData.isHappy = false;
builder.Prompts.text(session,prompt.user_bad_response_text+" "+prompt.address_query_text);
}).triggerAction({
matches: "Not Good",
intentThreshold:0.20
});
Conversation flow:
User: Hi Bot: Greetings from bot! Please tell me your name before we proceed. User: John Doe Bot: Hello John Doe! How’re you doing ? User: Iam good
Steps to Reproduce the Issue
- Use the above conversation flow to reproduce the issue with the Emulator.
- Train LUIS bot on text: "I am good", Im good" for intent=Good. However, provide a user response of "Iam good".
- You won't receive any response in the emulator.
Expected Behavior
The intent handler corresponding to the highest scoring intent should always be triggered. The bot should respond based on this intent handler.
Actual Results
There is no response as multiple intents surpass the default intent threshold, despite explicitly setting the intentThreshold parameter of triggerAction to a different threshold value.
Posted on SO as well: https://stackoverflow.com/questions/44901906/intent-handler-does-not-work-when-multiple-intents-have-scores-higher-than-defau
closing as duplicate of https://stackoverflow.com/questions/44901906/intent-handler-does-not-work-when-multiple-intents-have-scores-higher-than-defau
This issue is still open