Skip to main content
Version: 2.0.0

Intent

This chapter will introduce: what is intent, and how to create and manage intents on the platform.

What is Intent?

  • Intent name: Intent is usually named after what the user wants to accomplish. For example, get weather conditions, get a way to address a problem, complete a task, etc. Intent name is the standard trigger word for the intent.

  • Intent type: Intents can be divided into customized intents and system intents

  • Trigger: Users often use different questioning phrases when they want to express the same intent. The agent will match the similarity of the user message with triggers of all intents to identify the user's intent. The two main types of intent triggers are keywords and utterances.

    • Keywords: The platform supports two trigger conditions: equal to and include.

      • Equal to: Intent will be triggered when user message strictly matches the keyword.
      • Include: Intent will be triggered when user message contains the keyword.
    • Utterances: Intent will be triggered when user message is highly similar to the utterances. Apart from adding text utterances, you can also add formats here for advanced configurations.

      note

      Utterances are examples of telling the agent what user message can trigger this intent.

      In practice, it is recommended to have more than 20 utterances to help the agent better understand user intent.

System Intents

In addition to business-related intents that require developers to build themselves, the platform has also set some system intents that can be used in general scenarios.

Out of scope

When the user message is not a trigger of any intent, the "out of scope" intent will be triggered and the agent will send fallback responses.

Messages will trigger this intent include includes abusive sentences, expressions that cannot be distinguished but are easily triggered by mistakes, and expressions that are easily triggered by mistakes outside the business scope.

Exit

Users can quit the conversation by triggering the "exit" intent.

When the "exit" intent is triggered, the agent will end the flow, clear the cache and send the message: "You have exited the conversation."

How to create and manage intents?

  1. Click "Build - Resources - Intent" to enter the page.

    Two system intents will be displayed on the list. You can set customized triggers for each intent. system-intent

  2. Click "+CREATE", set the intent name and trigger to create a new intent.

    1. To add a new item under "Utterances", enter simliar statements and clik "Add" or hit Enter.

    2. TO add a new item under "Keywords", enter the words or phrases and hit Enter. edit-intent

  3. After successfully created an intent, the list will display its name, trigger and modified time.

    By default, intents are listed in the order of created time. You can set the filter condition with skill type or trigger. You can also reorder them in the modified time. has-intent

caution

Generally speaking, the intents being used in skills cannot be deleted. You need to remove it from the skills before deleting an intent. Besides, for the intent only used in FAQ, you can choose to delete the corresponding FAQ at the same time when deleting intent.

Format: advanced configuration of utterances

  • Examples with slots: Utterances that share a similar structure can be configured as a format.
    • If configured as utterances, you may need to add several items. For example,
      - Can I return the apple?
      - Can I return the peach?
      - Can I return the pear?
    • However, you only need to add one item if configure these sentences as a format.
      - Can I return the [apple]{"entity": "fruit"}?
    • Here is a general example with slots:
      '[example]{"entity": "entity name"}'
  • Examples with roles: You can also tell the agent how to fill multiple slots from user inputs.
    • For example, here are two user inputs that share a similar structure
      - I want to go to Shanghai from Beijing.
      - I want to go to Shanghai.
    • As you can see, Beijing is the departure, while Shanghai is the destination.
    • They are both city entities but play different roles in the utteracne. Therefore, we need to configure the format as follows:
      - I want to go to Shanghai{"entity": "sys.city", "role": "destination"} from Beijing{"entity": "sys.city", "role": "departure"}.
      - I want to go to Shanghai{"entity": "sys.city", "role": "destination"}.
    • Here is a general example with roles:
      '[example]{"entity": "entity name", "role": "role name"}'
Names of preset entities
  • Time: sys.time
  • Date: sys.date
  • City: sys.city
  • Any content: sys.any