请求确认Watson Conversation中较低的置信度 [英] Request confirmation on lower confidence levels in Watson Conversation
问题描述
我知道如何根据意图匹配和置信度设置条件.如果置信度高于某个阈值,我想继续进行该流程,并在继续进行流程之前请求确认是否在中间范围内.
I know how to set conditions based on intent match and confidence level. I would like to proceed with a flow if the confidence is above a certain threshold, and request confirmation if it is in a mid-range before proceeding with the flow.
我可以通过将节点加倍来做到这一点:
I can do this by doubling the nodes:
- 创建一个高度匹配的节点
- 在下面创建一个与较低级别匹配的节点.如果得到确认,请绕过条件返回到第一个节点.
是否有一个更好的模式,它不能复制所有节点?
Is there a better pattern that doesn't duplicate all nodes?
推荐答案
我对您的问题感到困惑,但是,我相信您希望基于意图和意图信心来建立条件.对吧?
I'm confused by your question, but, I believe you want make condition base on intent and confidence from intent. Right?
好吧,我相信您可以使用代码来做到这一点...并且让Watson仅出于理解意图并指出信心的目的而工作.或者,您可以通过以下方式在整个会话中创建一个节点:
Well, I believe you can do this with code... And let Watson work only for the intelligence of the understandings of intentions and point the confidence. Or you can create a single node throughout the conversation as:
if intent.confidence >= 0.75
回复:我不明白你的问题.
Response: I did not understand your question.
或者,针对每个设置条件和意图使用代码,例如:
Or, with code for each set condition and intent, like:
if(intent[0].intents === 'requestPizza' && intent.confidence >= 0.75) {
data.output.text[0] = "Hey, you want request pizza or you want to know how to request pizza?";
}
请参见示例来自IBM Developers和Nodejs.
See one example from IBM Developers with Nodejs.
这篇关于请求确认Watson Conversation中较低的置信度的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!