Can Wit return a match percentage based on user input vs intent?
I have created a large (~200 story) app. Each story contains a unique user question / intent. When the user asks a question, Wit tries to match it to one of the questions / intents I have set up. I would like to know the match percentage of the user's input to the question that Wit thinks is the correct one.
The problem is that sometimes Wit matches incorrectly... and while we will continue to train the questions / intents in Understanding, I would like to be able to create some logic if the match % is under a certain threshold. If the match % is too low, perhaps we display the top 3 match choices for the question and let the user select one or tell us if it's none of the above. Or perhaps if the match % is too low we ask the user to rephrase the question. But right now, Wit just automatically matches it to the closest story even if (I suspect) the match % is relatively low. So when it makes mistakes with matching, there's no recourse from our side to control or even detect that.
If there are alternative ways to solve this problem, I would definitely be open to hearing that as well.
With each Wit.ai response, there's a "confidence" key. I've noticed that when Wit.ai correctly matches an input to a story, the confidence is >= 0.50. When it has no idea what to do, the confidence is typically < 0.01 (honestly closer to < 0.001).
Hey @agrey, you can now get the top n intents with confidence scores when providing a n parameter to the POST /message request: https://wit.ai/docs/http/20170307#get--message-link.
patapizza, I am trying to do this in Node.js, is that possible? I have been looking around the Node docs but can't find any reference to it... not sure if the HTTP POST /message applies to Node implementations? Any tips? Sorry I may be missing something obvious, not sure.