Manage intents

An intent is what a user is trying to accomplish—for example, booking a flight, or checking the current status of a flight. In Mix.dialog you can use the NLU resource panel to manage intents, intent components, and entities.

Any changes you make to intents or entities in Mix.dialog become available in Mix.nlu, and vice versa. Use Mix.nlu to link entities to intents, by adding samples and annotating them. Associating each intent with a variety of representative utterances allows your application to be able to recognize what the user said in their own words. Refer to the Mix.nlu documentation for more information.

An intent component is a special type of component meant to handle one specific intent. Intent components are always named after the intent they handle. You can create an intent component from the Components pane, or add it on the fly when mapping intents.

An intent mapping represents the destination of an intent—that is, when the intent is recognized, the dialog goes to the specified intent component, generic component, or node.

When you create an intent component for an intent, this not only maps the intent to its intent component but also creates an implicit link, which is what allows the intent component to follow the corresponding intent’s name. Deleting an intent that was mapped to an intent component leaves a broken link in the intent component. In such an event, you have the ability to relink the intent component to another intent, or to convert it into a generic component, if it was not meant handle a single intent after all. If you chose the wrong intent by mistake, you can unlink the intent component.

Renaming an intent automatically renames the associated intent component, if any. You cannot rename an intent component as such, unless you first convert it into a generic component.

Predefined intents

All Mix projects include a predefined intent called NO_INTENT. Adding samples to this special intent in your NLU model makes the model more robust and allows your application to support utterances that don’t provide enough context for the NLU service to determine the right intent—for example, fragments (“espresso, please”) or entities shared between multiple intents (such as yes/no or date entities). Refer to Use the NO_INTENT predefined intent for fragments and Assign NO_INTENT for more information.

Mix projects that use Answers, also include a generated intent called Copilot_Answers. This special intent handles questions that your dialog design might otherwise not support.

Open the NLU resource panel

Click NLU, on the Mix.dialog toolbar, to open the NLU resource panel.

NLU resource panel, Intents tab example.

(Click NLU again to close the panel.)

Add an intent

  1. In the search field, type a unique name for the intent (see Naming guidelines)—for example, BOOK_FLIGHT.
  2. Click the Add intent icon .

Add an intent component for an intent

  1. Click Map this intent, next to the intent name.
    Tip: Use the search field to narrow down the list if needed.
  2. Click Create intent component.

Find an intent

Use the search field to filter the global intent mappings displayed in the NLU resource panel.

The panel updates as you type, to show only the mappings where the intents, intent components, or generic components match the search string.

If the intent you are looking for doesn’t exist, you can click the Add intent icon to create it, if desired.

To stop filtering, click the Clear search icon .

Rename an intent

  1. In the Intents list, bring your pointer to the intent you want to rename.
    Tip: Use the search field to narrow down the list if needed.
  2. Click the Edit icon .
  3. Enter the desired name (see Naming guidelines).
    If the intent is mapped to an intent component, this renames the intent component accordingly.

Delete an intent

  1. In the Intents list, click the checkbox next to the intent you want to delete.
    A toolbar appears above the intents table.
    Tip: Use the search field to narrow down the list if needed.
  2. Click Delete Intent.
    A message appears prompting you to confirm your intention.
  3. Click Delete Intent(s).

Set global mappings for intents

Intents can be mapped to components, to route the dialog based on the intent. When an intent is detected by the NLU model, the flow of the dialog can transfer to that component.

For most intents, you will probably want to have the intent handled consistently by the same component wherever the intent is detected in the dialog. In the Intents tab of the NLU resource panel, you can set global default mappings for intents.

Default mappings set in the NLU resource panel are inherited by intent mapper nodes but can be overridden if needed within the intent mapper node.

One-to-one vs many-to-one mappings

Mappings from intent to component can be of two types:

  • many-to-one—multiple intents mapped to the same (generic) component
  • one-to-one—only one intent mapped to a component

The types of mappings possible depend on the type of component. Only generic components support many-to-one mapping. Both intent components and generic components support one-to-one mapping. Intent components support one-to-one mapping only.

You can only map one intent to one intent component. If you want to map multiple intents to an existing intent component, you must first convert the intent component into a generic component.

Set a many-to-one mapping

  1. Use the check boxes beside the intent names to select the intents you want to map.
    Tip: Use the search field to narrow down the list if needed.
    A toolbar appears above the intents table.
  2. Click Map (n) to component, and choose an existing component from the list.
    Tip: If your project does not yet have the generic component you want to use, you can create it on the fly.
  3. Click Confirm to dismiss the message that prompts you to confirm your intention.
    This maps all selected intents to the specified component.

Set a one-to-one mapping

  1. Click Map this intent, next to the name of the intent you want to map.
    (Click the name of the current component, if the intent is already mapped.)
    Tip: Use the search field to narrow down the list if needed.
  2. Choose either the dedicated intent component, or an existing generic component, as required.
    Tip: If your project does not yet have the generic component you want to use, you can create it on the fly.

Add a generic component on the fly

  1. Click Map this intent, next to the name of the intent you want to map to a new reusable component
    (Click the name of the current component, if the intent is already mapped to an intent component.)
    Tip: Use the search field to narrow down the list if needed.
  2. Click the Add icon , next to Components.
  3. Enter a name for the new component (see Naming guidelines).
    The new generic component becomes available for mapping. It also appears in the Components section of the Components pane.

Remove the global mapping for an intent

Click the More actions icon for the mapping you want to remove, and choose Remove mapping.

Remove a broken mapping for an intent

After you deleted a component, if an intent was mapped to this component, this results in a broken mapping. In the mapping table, broken mappings are indicated by a warning: Mapped resource missing.

Click the More actions icon for the mapping you want to remove, and choose Remove mapping.

Once an intent has been mapped to a component in the NLU resource panel, it is easy to navigate directly to that component to further design it.

Click the More actions icon for the intent and choose Go to component.

This closes the NLU resource panel and shows the desired component on the canvas.