Skip to content

Intent management

Intents can be managed through the user interface of the Botsquad Studio. On the left side of the main menu, there should be an Intents section, which gives access to the intents manager.

When you don't see an Intents section, it might be that your bot has no intents YAML file defined. Go to Build → Add script… → click the "Add NLP Intents" item to create an empty intents file, and publish the bot. Now the Intents main menu item should be visible.

The intents manager looks like this:

It shows an overview of all intents that are defined in the bot. The intents are grouped per intents file; when you have multiple YAML files with intent definitions, each of these gets its own intents section in the intents manager.

Clicking the add button lets you create a new intent; clicking an intent allows you to edit it:

The intent has the following fields:

  • Identifier: the internal name of the intent; a constant will be defined with this name in Bubblescript.

    The intent identifier is unique over all intents; when you use a duplicated name, only the intent definition with the highest priority will be used.

  • Label: A label for the intent. This label will be used as quick-reply when the intent is used in the expecting: clause of an ask construct.

  • Match: a set of string matchers for the intent. The intent matches when any of these match against the user's input.

  • Topic: an arbitrary string, which can be used to group the entire list of intents into sub-groups. This grouping is shown on the intents overview page.

  • Dialogflow: The name of the intent in Dialogflow. When the Dialogflow integration is enabled, this intent will trigger when the dialogflow intent's name matches the one defined here.

  • Random response: A list of random responses that can be replied when the intent is matched. When this is used, a dialog with this intent as trigger will be created in runtime, which just does a say with one of the random responses. This is mostly useful for simple, "smalltalk"-like intents that you want to match. For anything more serious, consider creating Bubblescript dialogs yourself using the trigger: construct.

Intent priority

You might notice each row in the table of intents can be dragged: intents are defined in-order. This is especially important for intents that use string (regex) matches; if you create an intent that has a very wide match (e.g. .*), and it is on top of the intents list, the intents below it will never be matched because the topmost intent comes first.

Next up: Now that you know how to define intents, let's have a look at how intents are used inside Bubblescript ».