Request confirmation on lower confidence levels in

2019-09-16 12:12发布

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:

  1. Create one node that matches at high confidence
  2. Create a node underneath that matches at a lower level. If I get confirmation, route back to first node, bypassing the condition.

Is there a better pattern that doesn't duplicate all nodes?

1条回答
Ridiculous、
2楼-- · 2019-09-16 13:13

I'm confused by your question, but, I believe you want make condition base on intent and confidence from intent. Right?

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?";

}

See one example from IBM Developers with Nodejs.

查看更多
登录 后发表回答