Intent Prediction Process
  • Updated on 17 Aug 2019
  • 1 minute to read
  • Contributors
  • Print
  • Share
  • Dark
    Light

Intent Prediction Process

  • Print
  • Share
  • Dark
    Light

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;
};
Was this article helpful?