3.2.3 Intents, Utterances, Slots, List

An intent determines what your user is trying to accomplish. Utterances are the various ways your users might express the intent. You can have multiple utterances mapped to one intent. For example, for an intent called RCScheduler, you might specify a number of utterances like the following:

  • make an appointment on {date} at {time} with {staff}

  • schedule an appointment on {date} at {time} with {staff}

  • set a date on {date} at {time} with {staff}

  • add to calendar on {date} at {time} with {staff}

The text in curly brackets is called slot. Slots are variables you manage by lists. See Using slots in intents.

Creating an intent

  1. In your project, go to Create > Components > Intent Library.

  2. Click Add (+). The Create new intent dialog box appears.

  3. Click Next and enter the name for the intent you want to create. For example, RCScheduler.

  4. Click Add. The Intent screen appears.
    Note: Intent Name should be alphabets and underscore only. The Underscores in the beginning and the end of the intent name will be removed automatically upon saving.

  5. On the right side, specify the slots you want to use in the utterances. See Using slots in intents and Creating a custom slot.

  6. In the left side, enter an utterance, such as make an appointment on {date} at {time} with {staff}.

  7. Click Add Utterance for each variation you think a user may use to accomplish their task.
    An utterance can contain alphabets and special characters and must start with an alphabet or slot.

  8. If you want to require confirmation, move the slider button to on, and enter what you want the voice assistant to say to confirm the action before proceeding.

The following image shows the intent without the custom staff slot. See Creating a custom slot for an updated intent that uses the custom staff slot.

Using slots in intents

Slots are spoken utterances of the user. See How do I create lists (slots)? Phrases are spoken by the voice assistant. See also How do I create phrases for the voice assistant?

You can select an existing slot from the Slot Library that is available from the pull-down on an Intents dialog box. You can also create custom slots and map them to natural language processors (NLPs) like Amazon and Google.

The “Slot name - List name” combination can be used in other intents, but the same Slot Name cannot be associated with a different List Name.

For Google Dialog flow, the maximum number of slots/entities allowed in intent is 20.

For example, you can create a Number Intent that will take decimal numbers.

  1. Create an intent

  2. Add ORBITA.NUMBER to the List name.

     

  3. Give a slot name to it. The ORBITA.NUMBER will change to AMAZON.NUMBER.

     

  4. Refer the slot name to the utterances using curly braces {}.

  5. When you open the curly braces, the list of available slots will be populated in the dropdown. You can select one from the dropdown.

     

  6. You can create multiple utterances using the bulk upload option.

     

    Sample for bulk upload

    point {fractionPart} point {fractionPart} {integerPart} {integerPart} over {fractionPart} {integerPart} point {fractionPart} {integerPart} point {fractionPart} {integerPart} {fractionPart} {integerPart} . {fractionPart}

Choosing the NLP

You can choose to deploy the intent to the provider of your choice by selecting the NLP in the intent Edit screen.

Orbita allows all the characters in its Utterances (A-Z, a-z, 0-9, !@#$%^&*()_+-=[]{};':",./<>?`~|\).

Google Dialog flow does not restrict the Characters that you can use in Intent's user expressions. No characters will be stripped while deploying the utterances to Google Dialog flow.

Alexa allows limited characters in its utterances (A-Z, a-z, backtick, full stop, a hyphen, and curly braces when closed properly).

While publishing the intents to Alexa, Orbita will remove all the characters that are not supported by Alexa in intent's Usersays.

The characters that will be stripped off are ~ ! @ # $ % ^ & * ) ( _ + = ] [ : ; ' " | \ / ? , > < 0-9

Events

Orbita extends its support to Dialogflow's events. Input the custom event name in the Event field to tag the intent to that event.

The below screenshot is an example of the event name used for the Free text in Single input control of flow studio.

Creating a list (slot)

A slot is a variable in curly brackets { } that helps the voice assistant understand information about the request. For example, whether you ask “Alexa: What is the weather in Boston?” or “Alexa: What is the weather in New York?”, the intent you write (what is the weather in {CityName}) interprets the question using slots to respond to either request: “The weather in {CityName} is {getCityWeather}”.

Orbita has built-in slots for commonly used items, such as date, time, street address, and so on.

To use a slot in an utterance, select a slot from the dropdown and enter a name you want to use in the utterance. For example, select the built-in slot ORBITA.DATE and name the slot date. Then use the curly bracket around the name (such as {date}) in your utterance. The following examples show some uses:

  • I want to schedule an appointment for {date} at {time}

  • Tell me about restaurants in {city}

  • Is {athlete} still playing {sport} for {sportsTeam}

In this topic

Creating a custom slot

If you need a custom slot, you can create one, and then return to edit the intent to select your custom slot from the slot list. For example, perhaps you want to schedule an appointment with a specific person at the Red Cross, so you create a custom slot called staff and list the staff members in the slot.

To create a new slot go to Create > Components > Lists, click Slot Types and click Add. The following image shows the Slot Types screen with list values:

To add multiple values simultaneously or paste copied data, click the double arrow button.

When you choose to deploy the interaction model to Google Dialogflow, the characters that are not supported by Google Dialogflow will be truncated i.e. ^()<>|\

When you choose to deploy the interaction model to Alexa, the characters that are not supported by Alexa will be truncated i.e. Quotes (")

After the slot is created, it appears at the bottom of the slot selection list in the intent. The following image shows the RCScheduler intent updated to also use the staff slot.

When creating an intent, an intent may have slots. The list you would like to use in the intent should be given a Slot Name. This Slot Name will be used in the utterances.

The “Slot name - List name” combination can be used in other intents, but the same Slot Name cannot be associated with a different List Name.

 

Mapping Google and Amazon Slots

Amazon may support a slot that is not supported in Google and vice versa. You can see available slots in the Slot Library that are available from the pull-down on an Intents dialog box.

How do I create phrases for the voice assistant?


Where slots are spoken utterances of the user, phrases are spoken by the voice assistant. You create a list of phrases in a similar way to that you create utterances for slots. See also How do I create an Intent?

To create a new phrase list,

  1. Go to Project Side Navigation menu > Create > Components > Lists

  2. Click Phrases

     

  3. Click the Create a List button.
    Ensure the List Type is Phrases.

     

  4. Give it a name and click Add.

  5. Add different phrases that you would like the bot to say.

     

  6. Save the Phrase.

If you have a list of phrases, the voice assistant randomly selects from the list for more natural responses.
For example, the following image shows a phrase list called Confirmation with three responses.

You can use the phrases like slots by placing the curly braces around the Phrase list name in the Intent Confirmation field.

Using Phrases

  1. Go to the multi-modal content editor screen > Voice tab. You will find the multi-modal content editor screen in say node (Experience Designer), Flow studio controls, Survey controls, etc.

     

  2. Click on the token option to get a dropdown.

     

  3. Click on the phrase you wanted to add. (Here we selected WelcomePhrase instead of the default Hi, welcome to your project text)

     

  4. Deploy the changes.

Your Chatbot will now use phrases in the welcome message.

Video Content

https://cdn.orbita.cloud/assets/orbita/experiencedesigner/intentsslotsutterances.mp4

Video Key Messages

  • An intent determines what your user is trying to accomplish and utterances are the various ways your users might express the intent

  • A slot is a variable in the curly brackets { } that helps the voice assistant understand information about the request

  • Learn a step-by-step chatbot example for a “Getting the Weather” intent

Useful Links

http://orbita.ai

Related Content