Intents are the purpose or goal of an utterance. These are typically verbs, such as create, move, or resize.
In Lexicon, intents are defined in an asset file, just like entities. To create an Intent, right click in the Project view and choose Create > Lexicon > Intent. In the Inspector you can give the intent a name, action name, required entities, optional entities, and a set of sample phrases. Let’s look at an example:
In this example, we’ve defined an intent named Create with an action named Create Primitive. This intent requires a Primitive entity match in order to be processed. It also accepts Color and Position entity matches.
The sample phrases are used to train both Watson Assistant and Watson Speech to Text. Add phrases that include all possible verbs you want to trigger this intent, as well as all possible entities that should be considered. Note that you don’t have to add phrases that include every entity value, capturing a few sample values should be sufficient.
Defining sample phrases is the true art of creating a successful lexicon. Read the Watson documentation for guidance on Creating Intents.
Note that direct entity references using @Entity in the samples phrases is not supported by Lexicon at this time.