Intents and entities

Intent is a goal or purpose that the user expressed in their utterance, it represents an action that the user wants to perform. The same intent can be expressed by the user in many different ways, or phrases. These phrases are called utterances.

Entity represents values collected from the user in a conversation, so this is basically a keyword that you want to be extracted from the user’s utterance to resolve their query.

When you are creating a model with a specific domain, the out-of-the-box intents, sample utterances and entities are loaded automatically, if available. Your model will use these elements to understand the natural language input and direct the conversation flow.

The out-of-the-box data are labeled as RB-XP and cannot be deleted.

If needed, you can disable selected out-of-the-box intents by switching off the toggle as shown below.

Adding custom data

Besides using the existing resources, you may also want to extend your model’s understanding with your custom intents and entities. Also, if you are creating a custom domain model, you will have to add your own data from scratch. Either way, you can find the step-by-step instructions below.

Uploading custom data

You can upload your Custom Training Data using TXT, CSV, or TSV file format making sure the encoding is UTF-8 and that the line breaks are Unix/Linux style. Below in the text you can find an example on how the file’s content should look like.

To upload your custom data, proceed as follows:

  1. Navigate to NLU → NLU Models tab.

  2. Select a model and click on it. The model drill-down page opens.
     

  3. Click the Upload icon. The following dialog box opens:

4. Select a file in TXT, CSV, or TSV.

I don't need my account anymore;Close.Account
i have a question;Inquire
When is the new model coming out;Inquire.Availability
I want to change my username.;Update.Account
My credit card was declined. Can you rerun it;Trouble.Payment
CODE

5. Click Create. The dataset is uploaded, and the intents and utterances are now added to your model.

Adding intents

To add an intent to your model, proceed as follows:

  1. Navigate to NLU → NLU Models section.

  2. Select a model and click on it. The model drill-down page opens.

  3. Go to the Intents tab and click the Plus icon.

4. The following dialog box opens. Enter an intent name.

The intent name must start with a letter and contain no spaces. It can consist only of letters, dots, hyphens, or underscores. Symbols must be followed by a letter.

5. Click Create to confirm. The intent has been added.

  • To edit an intent’s name, click the Pencil icon.

  • To delete an intent, click the Delete icon.

You can only delete custom intents. The out-of-the-box intent cannot be deleted or edited.

Adding utterances

Utterances can only be added to your custom intents. You cannot add utterances to the out-of-the-box intents.

To add utterances to an intent, follow the steps below:

  1. Select an intent and click on it.

     

  2. Enter an utterance into the highlighted input field.

  3. Press <Enter> on your keyboard. The sample utterance has been added to the corresponding intent.

To delete an utterance, hover over it and click the Delete icon.

You can only delete custom utterances.
The out-of-the-box sample utterances cannot be deleted or edited.

Adding entities

Custom domain models do not support entities.

To add an entity, follow the steps below:

  1. Navigate to NLU → NLU Models section.

  2. Select a model and click on it. The model drill-down page opens.

  3. Go to the Entities tab and click the Plus icon.

4. The following dialog box opens. Enter an entity name.

The entity name must start with a letter and contain no spaces. It can consist only of letters.

5. Click Create to confirm. The entity has been added. The added entities are labeled as CUSTOM.

Adding values and alternatives

For each entity, you can add multiple values and multiple alternatives for each value. All alternatives (global and context ones) are mapped to the reference value that you’ve defined. If you do not want to declare a reference value and you just want the entity to be triggered based on your alternatives, just leave it blank.

To add a reference value and global alternatives to the entity, follow the steps below:

  1. Select an entity and click on it.

  2. Click the + Add Reference value and Alternatives button.

3. Enter the reference value.

4. Enter a global alternative and press <Enter> on the keyboard. You can add multiple alternatives to one value.

For alternatives, you can use single words or short phrases.

5. When you are finished, press <Enter> on the keyboard again. The value and alternatives are added.

To delete a reference value, hover over it and click the Delete icon.

To delete an alternative, double-click it and then click the Delete icon.

You can only delete your custom values and alternatives. The out-of-the-box elements cannot be deleted.

Adding Contexts

You can think of contexts as “pictures in time”. For each context, you can define one or more parameters that depict a specific point in time within a conversation.

To add context, proceed as described below.

  1. Click the Contexts button.

2. Click the Plus icon.

3. The dialog box opens. Enter the context name and tag. The context name must start with a letter and contain no spaces. It can consist only of letters, dots, hyphens, or underscores.

4. Confirm by clicking the Create button. The context has been added.

Adding context alternatives

Context alternatives are words or short phrases that a customer may use under a specific context. These context alternatives are mapped to the declared reference value or just trigger the entity if no reference value exists, ONLY when the selected context is applicable.

To add a context alternative, proceed as described below:

  1. Select a value and click the Arrow button.

2. Click the Add Context Alternatives button.

3. Add a context alternative and press <Enter> on the keyboard. You can add multiple alternatives to one value.

For context alternatives, you can use single words, short phrases, or regular expressions.

4. Select a context from the drop-down list of previously created contexts.

5. The context alternative has been added. To add another context alternative, click the Plus icon.

To delete a context alternatives block, click the Delete button.