Compute
Elastic Cloud Server
Huawei Cloud Flexus
Bare Metal Server
Auto Scaling
Image Management Service
Dedicated Host
FunctionGraph
Cloud Phone Host
Huawei Cloud EulerOS
Networking
Virtual Private Cloud
Elastic IP
Elastic Load Balance
NAT Gateway
Direct Connect
Virtual Private Network
VPC Endpoint
Cloud Connect
Enterprise Router
Enterprise Switch
Global Accelerator
Management & Governance
Cloud Eye
Identity and Access Management
Cloud Trace Service
Resource Formation Service
Tag Management Service
Log Tank Service
Config
OneAccess
Resource Access Manager
Simple Message Notification
Application Performance Management
Application Operations Management
Organizations
Optimization Advisor
IAM Identity Center
Cloud Operations Center
Resource Governance Center
Migration
Server Migration Service
Object Storage Migration Service
Cloud Data Migration
Migration Center
Cloud Ecosystem
KooGallery
Partner Center
User Support
My Account
Billing Center
Cost Center
Resource Center
Enterprise Management
Service Tickets
HUAWEI CLOUD (International) FAQs
ICP Filing
Support Plans
My Credentials
Customer Operation Capabilities
Partner Support Plans
Professional Services
Analytics
MapReduce Service
Data Lake Insight
CloudTable Service
Cloud Search Service
Data Lake Visualization
Data Ingestion Service
GaussDB(DWS)
DataArts Studio
Data Lake Factory
DataArts Lake Formation
IoT
IoT Device Access
Others
Product Pricing Details
System Permissions
Console Quick Start
Common FAQs
Instructions for Associating with a HUAWEI CLOUD Partner
Message Center
Security & Compliance
Security Technologies and Applications
Web Application Firewall
Host Security Service
Cloud Firewall
SecMaster
Anti-DDoS Service
Data Encryption Workshop
Database Security Service
Cloud Bastion Host
Data Security Center
Cloud Certificate Manager
Edge Security
Managed Threat Detection
Blockchain
Blockchain Service
Web3 Node Engine Service
Media Services
Media Processing Center
Video On Demand
Live
SparkRTC
MetaStudio
Storage
Object Storage Service
Elastic Volume Service
Cloud Backup and Recovery
Storage Disaster Recovery Service
Scalable File Service Turbo
Scalable File Service
Volume Backup Service
Cloud Server Backup Service
Data Express Service
Dedicated Distributed Storage Service
Containers
Cloud Container Engine
SoftWare Repository for Container
Application Service Mesh
Ubiquitous Cloud Native Service
Cloud Container Instance
Databases
Relational Database Service
Document Database Service
Data Admin Service
Data Replication Service
GeminiDB
GaussDB
Distributed Database Middleware
Database and Application Migration UGO
TaurusDB
Middleware
Distributed Cache Service
API Gateway
Distributed Message Service for Kafka
Distributed Message Service for RabbitMQ
Distributed Message Service for RocketMQ
Cloud Service Engine
Multi-Site High Availability Service
EventGrid
Dedicated Cloud
Dedicated Computing Cluster
Business Applications
Workspace
ROMA Connect
Message & SMS
Domain Name Service
Edge Data Center Management
Meeting
AI
Face Recognition Service
Graph Engine Service
Content Moderation
Image Recognition
Optical Character Recognition
ModelArts
ImageSearch
Conversational Bot Service
Speech Interaction Service
Huawei HiLens
Video Intelligent Analysis Service
Developer Tools
SDK Developer Guide
API Request Signing Guide
Terraform
Koo Command Line Interface
Content Delivery & Edge Computing
Content Delivery Network
Intelligent EdgeFabric
CloudPond
Intelligent EdgeCloud
Solutions
SAP Cloud
High Performance Computing
Developer Services
ServiceStage
CodeArts
CodeArts PerfTest
CodeArts Req
CodeArts Pipeline
CodeArts Build
CodeArts Deploy
CodeArts Artifact
CodeArts TestPlan
CodeArts Check
CodeArts Repo
Cloud Application Engine
MacroVerse aPaaS
KooMessage
KooPhone
KooDrive
On this page

Show all

Adding an Intention

Updated on 2025-01-23 GMT+08:00

Intentions can be classified into the following types:

  • General Intention: intention driven by corpora. The general intention is the most commonly used. It is usually configured when the Semantic Recognition diagram element is used to recognize the semantic content in the customer statements in a dialog flow.
  • Unknown Intention: intention selected when customer input is not recognized. Each domain needs this type for the intentions not matched in the domain. The unknown intention is preset.
  • Event Intention: intention selected when a specific event is triggered. For example, if a sensitive word configured in the system exists in customer statements, the Sensitive Word event is triggered. The event intention is usually used to match specific events and return the matched events. The Sensitive Word and Clear Context event intentions are preset.
NOTE:

What are the differences between a general intention and an unknown intention?

A general intention is a common intention that contains corpus information. For example, queries about weather and air tickets are general intentions. An unknown intention is an intention that is not recognized and contains no corpus information. It contains only response information.

You need to understand the following concepts during the intention configuration:

  • Corpora are all possible statements of customers for an intention. For example, you need to prepare a template for playing music for customers. In this template, all possible statements related to music playback need to be listed, for example, "Play music for me" and "Play a song".
  • For details about how to add a common corpus, see 3.d. For details about how to add a rule corpus, see How Do I Use a Rule Corpus?.
    NOTE:

    Corpora are classified into corpora and rule corpora. What are the differences between a corpus and a rule corpus?

    • Corpus: all possible statements of customers for an intention.

      Slots can be marked in a corpus. When marking slots directly, use a corpus.

    • Rule corpus: corpus that is configured to match the customer input. A rule corpus cannot mark slots, but can be applicable to all expressions of the same sentence. When expressing statements in fixed sentence patterns, use a rule corpus. For example, in [Help me|I want to] (subscribe to a data package|subscribe to the broadband service), the square bracket defines optional rules, the vertical bars (|) indicate multiple choices, and the parentheses define mandatory parts. In this case, subscribe to a data package and subscribe to the broadband service can be recognized through the Semantic Recognition diagram element.
  • Slots are parameters to be collected during dialogs. For example, to implement a train ticket booking intention, a customer needs to provide information such as the departure city, arrival city, and departure time. Such details are called slots. To obtain a customer intention, you can obtain customer information, such as the time, location, and category, and add the information as slots.
  • Entities refer to words that can be understood as parameter values in the voice content of a customer. For example, such words can be 3 kilograms and apple in the content I want to buy 3 kilograms of apples or one, tomorrow, and Beijing in the content One train ticket to Beijing tomorrow. The difference of the entity and slot is as follows: A slot represents the nature of an intention. An entity is not dedicated to an intention but used to fill a slot. In this way, modeling is performed for parameters and values separately.

Based on Table 1, you need to add two intentions and two entities. You can use the two preset entities. The following describes how to add an appointment intention.

Procedure

  1. Add a domain. For details, see Adding Domains.
  2. Add a doctor entity and department entity. For details, see Adding Entities.

    Figure 1 Adding a doctor entity
    Figure 2 Adding a department entity

  3. Add an appointment intention.

    1. Go to the new domain, click Create, and choose General Intent.
    2. Enter an intention name, for example, Appointment.
    3. On the Context tab page, click Create in the Input Context area to add a context for the current intention. In this example, no context is added.

      Context indicates that the robot processes multiple groups of statements as the same round of dialogs based on the value in a multi-round dialog. When an intention is specified, character strings configured in the context can be used to locate it.

      An intention context can be understood as the dialog memory of a robot. A robot identifies and handles multiple rounds of dialogs that have the same context as one task. For example, by multiple rounds of Q&A, a robot successively obtains the departure time, departure location, and destination for flight reservation. When the robot receives other contexts in the flight reservation context, such as a weather query context, the robot switches to a new intention that corresponds to the customer's questions. In this way, multi-intention conversion is realized.

    4. On the Corpus tab page, click Create.

      Analyze the customer's possible answers and add the answers to the corpus. For example, if the customer may answer "I want to appoint Dr. Li's Internal Medicine at 16:00 tomorrow afternoon", double-click the text box and enter I want to appoint Dr. Li's Internal Medicine at 16:00 tomorrow afternoon. Then, select tomorrow afternoon and choose @system.date from the displayed menu, and select 16:00 and choose @system.time from the displayed menu.

      NOTE:

      How to mark a slot?

      After the corpus is entered, press Enter to automatically mark the slot. However, some corpora are special (such as this example), that is, the slot that is automatically marked after you press Enter does not meet the requirements. Therefore, you need to manually mark the slot.

      You can add the following corpus information.

    5. On the Slot tab page, set the slot name, whether the slot is mandatory, and the question information provided by the system when the slot information is missing.

      The name of the slot will be part of the slot variable name used during flow orchestration.

      NOTICE:

      The complete time, date, department, and doctor must be provided to confirm an appointment. Therefore, the four slots are mandatory. Enable Mandatory for them.

    6. On the Response tab page, click Add, and configure the command word returned after the intention matching succeeds.

      Response means the text or command word to be reported when the intention is matched. A response can return different texts or command words depending on the condition expressions. When you need a matched intention to return prompt information to the customer, configure the TTS. When you need a matched event to be written into TOC.IntentCode and returned to the invoker (for example, the dialog flow), configure the command word.

      Click the Command text box, and set it to finish.

      Click , set Reply Type to TTS, and set Reply to You have appointed {$doctor}'s {$room} at {$time} on {$date}.

    7. Click Save in the lower right corner.
    8. Click Train in the upper right corner. A message is displayed, indicating that the training is successful.
    9. Click Test in the upper right corner to test the current intention.

      If you have configured the context when adding an intention, enter the configured context in the context text box on the chat page before asking the robot. Otherwise, you do not need to enter the context.

      During the test, ask the robot based on your corpus and check the robot reply. If the following information is displayed, the matching is successful.

We use cookies to improve our site and your experience. By continuing to browse our site you accept our cookie policy. Find out more

Feedback

Feedback

Feedback

0/500

Selected Content

Submit selected content with the feedback