The final step of processing an Intent is to predict the user's next Intent.
The FrontM platform does this by going through all the App's Intents and calculating their probability (a co-efficient between 0 and 1).
The platform will then suggest the most likely Intent(s) to the user as Smart Suggestions.
The process is automatic but developers can override the process writing the Intent class's onPrediction() closure.
In the example below, if the co-efficient is greater than 0.5 the Smart Suggestion 'How are you?' will be shown. The co-efficients will determine the sorting of the list of Smart Suggestions:
let intent1 = new Intent('intent1');
intent1.onMatching = () => {
return state.messageFromUser === 'intent1';
};
intent1.onResolution = async () => {
....
};
intent1.onPrediction = () => {
//logic calculates coefficient
...
return coefficient;
};
Comments
0 comments
Please sign in to leave a comment.