问题
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:
- Create one node that matches at high confidence
- 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:
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.
来源:https://stackoverflow.com/questions/44051198/request-confirmation-on-lower-confidence-levels-in-watson-conversation