An Intent is the nature, or essence, of a message the user sends to the App (it is also the nature, or essence, of a message that, say, an API or another App might send it).
An example might be as follows:
"Hiya, Shall I book you a taxi?" - smart suggestion
(User clicks on 'Yes') - message
Book a taxi - Intent
The App will match the message with a particular Intent it holds; the Intents grouped according to a particular behaviour. By this, we mean that an App providing, say, an in-flight route map and associated destination information will behave differently (and hold different Intents) than an App that is used to track a shipping company's vessels. An App's behaviour is linked to the knowledge it possesses.
In order for a purposeful conversation to be held, each Intents is subject to a four-stage process: Matching; Validation; Resolution; Prediction.
To allow processing in this way, the developer must implement the Intent class's corresponding closures: onMatching(); onValidation(); on Resolution(); and onPrediction(). The FrontM platform executes them as follows:
Therefore, after a new message arrives:
- The Intent Matching process determines the Intent. This is done via scripts written by the developer in the onMatching() closure, the Natural Language Processing (NLP) engine and, if needed, any ML models that are available;
- The Intent Validation process determines whether the App is in the correct conversation State (i.e. whether the conditions in the state object are correct, with particular properties having particular values) in order for there to be a resolution. This process is optional;
- If validation is successful, the FrontM platform will execute the Intent Resolution process. This is asynchronous by nature (i.e. it may have to make external calls via, say, an API);
- The Intent Prediction process will predict the user's next Intent. The FrontM platform calculates the probability of each Intent in the App being the user's next choice. The most likely will then be presented to the user as (a) Smart Suggestion(s). This process will execute even if the Intent Validation process fails.
If an error state is set during the Intent Execution Flow, the Intent Error Handling Process is triggered.