【发布时间】:2018-02-15 02:49:13
【问题描述】:
编辑
对不起大家,这只是由于意图名称后面缺少逗号。我很抱歉x:
我最近正在使用 Microsoft Bot Framework (botbuilder v3.14.0)、Node.js (v8.9.4) 和 LUIS 创建一个聊天机器人。
我能够成功地“识别”机器人中的一些意图,并返回所需的结果,但对于某些意图,机器人似乎无法识别这些意图,即使 LUIS 的结果是指向正确的。
我尝试使用 LUIS 测试刀片进行测试,并在 chrome 中的端点 URL 之后直接输入查询。这两种方法都会返回相同且正确的意图。端点 URL 方法的示例结果如下:
{
"query": "why do you exist",
"topScoringIntent": {
"intent": "bot-existence",
"score": 0.597947
},
"intents": [
{
"intent": "bot-existence",
"score": 0.597947
},
{
"intent": "bot-joke",
"score": 0.04189388
},
{
"intent": "Exit",
"score": 0.0182088781
},
{
"intent": "None",
"score": 0.0164906159
},
{
"intent": "Cancel",
"score": 0.009767669
},
{
"intent": "Stop",
"score": 0.009608646
},
{
"intent": "bot-age",
"score": 0.009238302
},
{
"intent": "Greeting",
"score": 0.008374314
},
{
"intent": "bot-name",
"score": 0.00683666952
},
{
"intent": "Help",
"score": 0.00357789616
},
{
"intent": "StartOver",
"score": 0.00262053218
},
{
"intent": "checkDBStatus",
"score": 0.002412489
},
{
"intent": "refreshSchema",
"score": 1.35339326E-06
},
{
"intent": "checkDutyPerson",
"score": 5.41015623E-08
}
],
"entities": []
}
在这种情况下,机器人应该能够挑选出bot-existence 意图并执行以下代码:
intents.matches('bot-existence' [
function (session) {
console.log('bot-existence Intent');
session.beginDialog('bot-existDialog');
}
]);
但事实并非如此。但它适用于其他意图,例如bot-age、bot-joke 和checkDBStatus。这些意图的代码与上面bot-existence 的代码相同,只是进行了编辑以适当地适应意图。为了以防万一,我还多次发布了 LUIS 应用,但无济于事。
知道为什么吗?
【问题讨论】:
-
成功触发
bot-age、bot-joke等的话语得分是多少?您是否尝试过降低IntentDialog的意图分数阈值? -
我无法重现您的问题,您是否在添加
bot-existence意图后发布了您的 luis? -
@StevenG.,感谢您的回复。
bot-age带有“你的年龄”是0.8824824,bot-joke带有“告诉我一个笑话”是0.277950644。如何降低意图分数阈值? -
@GraceFeng-MSFT,感谢您的回复。事实上,我确实发布了 luis 应用,检查并再次发布了几次。
-
@StevenG。感谢您回来查看!我很高兴我发现了这个错误,我太粗心了!
标签: node.js azure-language-understanding