Chapter III Multi Round Dialogue Building
Task Dialogue
Before setting up a Task dialogue, it is very important to confirm what scenario the dialogue takes place in, what Task to be completed, what steps are required, and finally how to use existing tools to complete it.
3.1 Slot And Entity
3.1.1 Concept Of Slot And Entity
Specifically, the working method of Task dialogue is to collect information and make corresponding operations based on the collected information. In order for the Task dialogue to work in a certain scenario, it is necessary to sort out the business Process, determine the information to be collected, and what to do after collecting the information.
Here we also found that we need to store the effective information that the user said. In the platform, the structure of storing the effective information in the user's discourse is called slot. You can simply regard the slot as a basket that can be filled with things.
Of course, how do we identify whether users have said the information we need? We will use the structure of entity to judge whether the user's information meets the requirements. Its principle is simply like a building block that can be filled. Only if it conforms to a specific shape can it be judged by the entity.
Simply understand that the entity value is the key information to be collected in the intent Process, the entity is the filter to filter whether the problem mentioned by the user contains the entity value, and the slot is the variable to store the key information in the intent Process.
In the registration activity Process, the key information that needs to be collected by the agent is: user name, user's city.
When a user answers his name, such as "Zhang San", the agent can extract the Information Extraction and store it in the slot of "user name". At this time, the value of "user name" in the slot is equal to "Zhang San"; When a user answers his / her city, such as Beijing, he / she can extract this Information Extraction and store it in the slot of "user's city". At this time, the value of "user's city" in the slot is equal to "Beijing".
Many people ask why there are the concepts of slot and entity, especially slot. With slot, we can process entity values more flexibly, including clearing slot so that it can be filled again. Slot has a function of clearing slot after jump. In the scenario of confirming to the customer, if you may encounter multiple confirmations, it should be cleared immediately after recording, because the contents of each confirmation by the user are likely to be inconsistent, and one confirmation by the user cannot be used indiscriminately.
The meaning of entity lies in repeated use and identification. For example, the entity value of "fruit" entity can be set to "apple", "banana", "peach", etc. If there is no entity and only synonyms, the agent may not fully realize that apple and banana are two different fruits.
Some basic entity are preset in the system. We can use them flexibly. If our needs cannot be met, we can also add some entity for our own use.
Common entity are divided into system entity, enumerate entity and Regular Expression entity. The setting operation is in entity management of thesaurus, as shown below:
System entity: the information set of common entity for operation, such as number, name, mobile phone, ID card, city, date, etc., has been preset in the system. You can use entity according to the instructions on the entity details page;
Enumerate entity: you can create entity that contain multiple entity values. Each entity value is equivalent to an option for entity; Each entity value can have multiple statements. The system will consider that each of the statements has the same meaning, and any one contained in the user message can be accurately identified. For example, the vegetable type can be named as the entity name, and onion and potato can be used as different entity values respectively. For entity values like potato, we have different names such as potato, potato and potato, which can be put in a variety of statements of entity. The system will think that each of the statements has the same meaning, and any one contained in the user message can be identified.
Regular Expression entity: you can customize the Regular Expression to match the entity in the Task. Common message fragments with certain rules such as matching specific orders, product numbers, member numbers, etc. if you are not clear, you can consult the company's internal IT Engineer.
There are many other functions of Regular Expression, such as identifying the specified messages for organization and replacement, which we can learn more about if necessary.
Intent entity: the intent entity can identify the entire message of the user and identify entity values through comparison of similar problems. The overall operation process is similar to the identification of knowledge points. Enumerate entity can only be identified by accurate corresponding inclusion, and intent entity are relatively close to natural language.
3.1.2 Use And Precautions Of Slot
After entering the slot management page, click "new slot" to add a new slot. To create a new slot, you need to fill in:
Slot Name:
It can be easily understood and named according to the information that users need to fill in or confirm.
Reference entity: only referenced entity can be stored in the slot. Up to 50 entity can be configured.
Whole sentence filling slot: when the referenced entity is not recognized, the whole sentence of the user is filled into the slot.
The above explanation also has several meanings. If there is a referenced entity and it can be recognized, the slot is filled with a entity. If there is no referenced entity, the entire sentence of the user is put in the slot.
Usually, we will use the whole sentence to fill the slot in the case of open slot filling inquiry, such as asking users' suggestions and collecting users' addresses.
Note that if multiple entity are configured, when these entity are recognized at the same time, only the one in front of the configuration will be retained.
The life cycle of the slot is divided into two parts: the slot value is memorized in the whole round of dialogue (the whole round of dialogue takes effect) and the slot value is cleared after the unit jumps (the single round of dialogue takes effect).
Clearing the slot after cell jump means that the contents of the current cell jump relationship are cleared immediately after the saved entity values are used to jump. The next time you use this slot, it will be empty again, and will welcome questions with a new look.
It is often used to confirm something. When you jump back from other intent, you need to reconfirm it. Therefore, you do not need to keep the current confirmation information. For example, to confirm whether the user information is filled in correctly, the user needs to reconfirm each time.
Or when it is not necessary to save the multiple-choice questions of the user's options, the slot value we selected will be cleared after the cell jump. With this option, we can only use this slot for 100 topics. If you need to keep the corresponding information or use the corresponding information later, you can't choose this option.
The slot value is memorized in the whole round of dialogue, which means that the information obtained in the slot will not be cleared within the retention time of the slot until the end of the Task. After the information collection jump, it can be taken out for further use.
This usage is common in the collection of some user information. By default, these information of a single user will be retained throughout the whole life cycle, such as the user's name, mobile phone number, etc.
Slot can be used simultaneously with different intent in a scene, so:
There is no need to create multiple slot with the same meaning. For example, under a "ticket booking agent", even if there are multiple intent such as booking train tickets, air tickets and train tickets, they share the slot of "departure" and "arrival". These intent can be called directly when configuring them.
In the case of sharing the slot, when the user triggers the intent under the agent, if you want to switch among these intent, the obtained slot information will not be asked again. For example, when booking a train ticket, the user finds that there is no ticket and wants to change to an air ticket. At this time, he can say "change to an air ticket" to trigger the "book an air ticket" intent. The "place of departure" and "place of arrival" provided during the previous train ticket booking can be directly used by the agent, and the agent does not ask questions again.
Slot in different scenarios cannot be shared even if they have the same name.
In the Dialogue Flow, the slot will save the obtained information, but the slot cannot filter out specific information from user messages. For example, the user sends a message "my mobile number is 13812345678". The agent needs to identify the serial number as the mobile number first, and then save the mobile number to the slot. In order to identify specific content from a user's sentence, you need to let the slot reference the entity. The platform will automatically identify the entity in each message of the user. The enumeration experience of the user will be displayed in the debugging agent, but only the entity referenced by the slot will be saved to the slot.
In the dialogue Task, the slot is used to store data. For example, the "name" entity is used to store a series of names obtained in the dialogue, such as "Zhang San" and "Li Si". These specific names are called values of entity. For a user, the entity saves only one value, and the second acquisition will be refreshed. For example, if "ask for name" is called to obtain the user's name twice, the value obtained the last time will be saved in the system (if you want to avoid this situation, you can turn on "only ask for cell slot filling").
In the slot operation, click Edit to modify the configuration of the slot, including the slot name and the reference entity; Click "delete" to delete this slot.
Deleting a slot will affect the execution of the intent that uses a slot. If a slot is used in intent, it cannot be deleted; If the above situation occurs, you can click the number in the "used times" column to check which cells the slot is used by, and then disassociate the slot from the corresponding cell to delete it.
3.1.3 Operation And Precautions Of Entity
Entity can be found under dialogue building - Thesaurus - entity,
Click the plus sign on the right of the entity type to add a new entity of this type. After expanding the entity type like expanding the Category, you can see the name of the added entity or search in the search box above. When moving to the corresponding entity, the delete button appears to delete the entity (please confirm that the entity is not used in Task when deleting). The entity values of enumerate entity and various descriptions can be imported in batches. The same entity value can be used by multiple slot.
It should be noted that the entity only serves to identify the entity value. If you need to retain the entity value, you need to correctly use the Task unit and slot.
So how to confirm the type of entity we use?
Based on the openness and other information we need to answer, we can make the following judgments:
Degree of openness | Other features | Confirmation of filling type |
---|---|---|
Extraction in finite enumerable space | Exact match, including trigger | Enumerate entity, such as male and female |
Extraction in finite enumerable space | Fuzzy matching according to intent | Intent (entity) filling a trough, such as eating, eating or not eating |
Allow any value to pass judgment | Full text, rich text saving | Full sentence slot filling suggestions, free answers |
Allows values that conform to a particular form to be extracted | The system has been preset and can be used directly to meet the requirements | System entity mobile phone, ID card, etc |
Allows values that conform to a particular form to be extracted | The value of a text or array rule can be defined through a Regular Expression | Regular Expression entity, such as order number, membership number, etc |
Allows values that conform to a particular form to be extracted | It is necessary to write functions or access other systems for judgment | Fill in the slot through webhook, such as membership identification, etc |
3.2 Trigger How To Enter A Task
First of all, we need to confirm the scenario under which to start a Task. For example, when a bank teller applies for a card, we will say "apply for a bank card". When we recharge the mobile phone, we will say "charge the phone fee". At this time, "apply for a bank card" will trigger the bank teller's specific Task Process. We will provide some information according to a series of requirements. Like this, when we build agent to let them identify different intent, the process is intent differentiation and triggering.
Trigger Structure | Trigger Method | Working Principle |
---|---|---|
Keyword | perfect match | This intent is triggered when the user message exactly matches any one of the Trigger. |
Keyword | Fuzzy matching | This intent is triggered when the user message contains any keyword in the Trigger. |
Similar problem | The confidence of similar problems reaches the threshold | This intent is triggered when the user message is similar to any similar problem in the Trigger. |
Sentence pattern template | A pattern of sentences or phrases | When the user's words conform to a specific pattern after refining and induction. |
event | Such as opening a session, closing a session, sending an address, sending a picture, reaching a specified time, and so on | When these events are detected, one or a series of actions are performed. |
Sentence patterns are used for sentences that can be extracted from Task information and conform to a certain pattern. When triggered, entity are extracted for slot filling. Usually, because they can provide more accurate information, the priority is higher than Trigger.
In the sentence pattern module of the intent trigger, we can create a new sentence pattern to trigger the corresponding intent. The following sentence pattern can be used to trigger the corresponding recharge intent and fill the slot of the recharge flow quantity type when the user says: "help me recharge 30m traffic" and "help me recharge 1g traffic". (note that the @ symbol is used to activate the corresponding reference function)
3.3 Circulation And Execution Of Task
3.3.1 Brief Description Of Task Flow
In the process of Task dialogue, after defining the Task to be completed, you can know what information is needed. In fact, this reflects the difference from the FAQ dialogue, but it is unified. That is, in the process of Task dialogue, users are expected to provide some information. These information often has a range, which is designed according to the intent of users and business needs. In general, the process of Task dialogue is to continuously obtain these information, so as to achieve the purpose of User.
There are many ways to obtain this information. The most common way is to ask questions directly to users. In addition, it can also be obtained through CRM and other information management systems, and even through the processing of multimodal information such as pictures and audio.
In general, the flow of Task dialogue requires such abilities as asking questions, collecting information, sending messages, processing information, flowing to different branches, and obtaining information from internal and external systems. These information can be remembered and used by agent during the dialogue.
The Process view is easier to understand when describing these States, so we mainly learn in the form of Process drag and drop canvas. In a sense, such a agent will live a business Process after it operates.
3.3.2 Task Unit Type
In order to realize the dialogue of Task, various components composed of different functions are often configured and executed on the Process diagram. On the platform, most of these components are called units. Different products will also carry out different packaging (packaging) for these components according to their own ideas. You can use them according to your business Process.
Simple Task may only need a small number of necessary units to be successfully built. However, when complex Task are involved, sorting out the Process diagram of Task in advance will undoubtedly help us build a Task better and faster. It should be noted that the actual business personnel must participate in sorting out Task Process. After the Process is set, the actual business personnel should be based on historical data, Or your own experience, considering the state in most cases and whether it can be adapted in some typical cases.
Of course, if we want to make full use of the existing Task units and Process logic, we need to know what the existing Task units are.
At present, the types of Task units are divided into Request Block, Inform Block, single slot interface unit, Webhook Block, silent slot filling unit, slot operation unit, slot recording unit, table reading unit, attribute reading unit, attribute writing unit and intent destination unit.
3.3.3 Ask Request Block
The query unit has a complete set of styles. Let's take a look at the functions that can be realized by the Task dialogue based on the query unit.
The query information unit is an important part of the Process. It is used for all the information that can be collected only when the user sends a message to the agent. For example, ask the user's name, mobile phone number, etc. The agent can also judge the next unit to jump according to the information asked. For example, the agent can ask the user to do a questionnaire in the form of a dialogue. The next questions of the agent can be different according to the options selected by the user.
The inquiry unit is mainly composed of four modules. Click the small triangle to the right to expand more:
The unit design of the platform is mainly the product design planned by filling the slot, which emphasizes the importance of filling the slot. Secondly, it highlights the main functions and reduces the impact of other settings on the construction.
The basic configuration module has unit names and associated slot.
Query slot filling is divided into query statement, dialogue strategy and preset response configuration.
The successive response function of the inquiry unit can achieve the function of gradual clarification. In the first step, you can ask "what is the mobile phone number", and in the second step, "you can confirm whether the number of digits entered is less. At present, only the mobile phone number composed of 11 digits is supported".
Accordingly, if send only once is checked, the corresponding message that has been sent will not be response again when it passes through this unit next time.
Preset response is similar to FAQ's input reminders and recommended questions, helping users to click instead of filling in, and improving user response efficiency.
The following are the descriptions of the dialog policy configuration:
Number of attempts to ask: how many times can you ask if you don't get an answer that can fill the slot, and reset the current unit again;
The function of trying to ask times means that you will not continue to ask questions after you have not obtained the entity value that can fill the slot for how many times. Usually, when this information is not particularly needed, we can adjust this number to once, and even if we can't ask.
Fill the slot only when the current unit is asked : When the general setting is turned on and off, the content of the slot may change the content of the current slot according to the user's previous or subsequent conversations. Such slot filling is often difficult to find and troubleshoot during the Task; Generally, when we allow filling slots anywhere in the intent, the requirements for filling slots on behalf of this information are very strict, such as mobile phone, email, ID number, order number, etc., or the corresponding information does not affect the final decision and is only used for collection.
The platform Task can be said to serve slot filling in a sense, so as far as possible, we will fill in the slot that can be filled. The advantage is that if we want to ask the user's mobile number and email at the same time, after the user says the mobile number and email, we can fill in two slot without too much configuration, that is, the slot where the mobile number and email are placed. The filled slot will not be asked, but will be directly carried out backward according to the configured jump relationship.
In some cases, blindly filling in the slot will make us unable to highlight our questions. For example, when confirming whether the user wants to sign an agreement, if the user's statements in the previous conversation comply with the entity rules for confirming the slot (yes, no, etc.), then the slot will be filled with "confirm" or "Cancel" in advance. This round will no longer perform confirmation.
Therefore, "fill in the slot only when the current unit asks" can ensure that the user sees what we want the user to ask, and let the user really understand what we want him to confirm, rather than ignoring the user's choice.
Ask when the user doesn't speak: if the user doesn't speak after asking, ask the user again after the specified time.
This is an action to activate the user, so that the agent can guide the user to complete the agent. Similar to the customer service, when the user hasn't response for a period of time, he asks the customer, "are you still there?" "Do you have any other questions?".
When the agent gets multiple values, clarify to the user:
When enabled, if the agent obtains multiple values that can fill slots according to the user statement. The agent will make a round of clarification to the user, allowing the user to select a value and finally fill it in the slot.
When it is turned off, multiple values obtained by the agent will be spliced into a string and filled into the associated slot as a whole.
For example, when opening clarification, in the scenario shown in the following figure, according to the statement of the user's reservation of the conference room, the agent queries multiple conference rooms, and the agent will list the conference rooms in the form of a quick response for the user to select
When the number of queries is exhausted, the following values are used to fill in the slot and serve as the jump basis: this function can skip the current round to continue the Task when the user does not give an ideal answer to the current round. First, it can arrange the user to take the default route. Second, it can also review and count at the end of the Task to continue to supplement the corresponding information.
The jump relation of the query unit takes effect only based on the entity value in the slot. Sometimes when we ask questions, we need to use the specified value as the jump basis when we want to go down no matter what the user says after the query times are exhausted. This allows the user to continue down the Process.
Jump relationship can set jump methods. Its principle is to meet what conditions and then do what. The condition priority is set. The one who is in the front row will go first, the one who is in the back row will go later, and the others will go last.
What we need to pay attention to is that we can set whether the modes such as greater than, equal to, and less than refer to the slot, whether a specific value contains, conforms to Regular Expression, belongs to a specific entity, and other modes.
Let's take a look at the configuration of the mobile phone number unit.
Among them, the dialogue strategy is as follows:
Because the platform has no restrictions and can only connect backward, there may be situations such as looping or multiple use of a certain Process in the Process or intent. In these cases, if some messages or query messages do not want to appear in the user's conversation again. You can choose to execute only once, so that when you jump back to the Process, the unit will not be executed again.
The function of data source URL means that we can send messages in the form of questions, scripts, pictures, links or cards through the interface.
If we observe carefully, we will find that both the Inform Block and the silent slot filling unit are simplified versions of the query unit.
3.3.4 Inform Block
The message sending unit simply sends a message to the user without the user's response. It can send one or more messages.
So the message unit mainly includes three modules: setting unit, BOT response, and jump relation.
Jump relationship here, only one unit in a fixed direction is allowed to jump. Other settings are similar to the query unit.
Mainly used at the beginning and end of a intent. A message sending unit can be placed to send welcome words at the beginning and farewell words at the end to users. If the message type belongs to a welcome message or other situations that do not need to be sent again, and it is only sent when the intent has just entered, you can check send only once.
The sending unit allows sending delayed messages.
If the Task unit is not accessed later, the Task has actually ended at the intent level, but has not yet ended at the execution level. To end the Task, you need to configure the intent endpoint unit.
3.3.5 Silent Slot Filling Unit - Jump According To Unnecessary Information
Bind a slot. If the user mentions the information required by the slot, they will collect it. If they don't mention it, they won't ask. After the silent slot filling unit is bound to the slot, it will monitor every sentence the user says after entering the intent. As long as the slot can be filled, the silent slot filling unit will extract the entity values inside and put them into the slot. Once the information is collected, the unit is deemed to be triggered, and then the Process will jump according to the jump conditions configured for the unit.
This unit is also widely used. It is usually used when the agent does not actively ask, but collects better after it gets it, and even determines the subsequent Process of jump. For example:
In the detective game, we need to collect the specific information provided by the user (for example, a certain keyword is triggered). If we do, we need to trigger the corresponding story according to the keyword (that is, trigger a specific unit);
For example, the information we need for event registration is the user's email and mobile phone number. If the city can be collected to provide more accurate services, this Process can be set like this.
Suppose we make a water heater Process, and under normal circumstances, we will gradually guide the user to say the desired type, number of users and other information. However, if the user directly says a specific product, we can skip these preconditions.
When buying a ticket, the general Process is that the agent asks the departure place, destination and time, and then finds out which tickets can be bought. However, users can also directly provide the flight number. When the flight number is provided, there is no need to ask the departure and destination. It is equivalent to that after collecting an unnecessary information, the jump of Task is affected according to this information. Users can also ask questions flexibly at any time.
Generally speaking, this unit will be placed in the front of the Task. Pay attention to the need to configure the jump logic when the slot of the unit is not collected.
In the charging scenario, we also allow users to recharge traffic. When we get some intent indicating that users actually need to recharge traffic, we can let users recharge traffic. For specific settings, please refer to the following figure:
If you want the user to continue the Task through the entity values that can be collected after completing the Task, you can use the silent slot filling unit in front of the Task Process to solve the problem.
3.3.6 Slot Operation Unit - Modify And Calculate Slot
Although the operation unit feels like calculation, it is essentially the modification and calculation of the content of the slot. There are three main modes: reset, assignment and calculation.
Let's first look at the reset mode. In the actual business Process, we often need to confirm with the customer whether it is filled in correctly and how to modify it if it is incorrect. At this time, we need to correct the content of the slot. We can use the reset mode.
The working principle of the reset unit is that after selecting a slot, you can assign a value to it or clear the obtained value. When the slot is cleared, you need to return to the corresponding unit again to complete the slot filling action due to the lack of the corresponding completed slot.
Usage: not required or fill in words or numbers. If left blank, it means that the value in the selected word slot will be cleared (and the space will also be cleared).
The assignment mode refers to the value to be assigned to the corresponding slot. This value can be a number, a word, or even a combination of one or more slot.
Usage: text, value in slot (if there is no value, a space will be filled in), {slot}+ text.
It is equivalent to filling a value "AABB" into the slot for reset
Fill in "AABB", "slot AABB value" and "ccdd" into the corresponding slot
Fill in the value of slot AABB and put it into the corresponding slot
The calculation mode refers to four operations. The common method is to increase the slot by 1, which is very common in counting scenarios. Of course, we can also calculate two slot.
Usage: add, subtract, multiply, divide a slot or specific value.
3.3.7 Slot Recording Unit
The slot recording unit is easy to understand. It refers to whether to retain the user's selection information or fill in the content. The main configuration of the slot recording unit is the slot that needs to collect information. In the recharge intent, we need to collect the recharge quantity, telephone number and other information of users.
The slot recording unit can collect information obtained before the link and not cleared. The collected information is displayed in the Task dialogue information collection section and can be exported as needed.
Note: the information collected at the debugging agent cannot be recorded and exported. If necessary, it can be tested on the experience version web page. Users here can see it in the message record;
3.3.8 Intent Terminal Unit
Intent destination unit There are three main functions, end, jump and retain slot.
In the first usage, the end means that there is no subsequent unit to be executed or the intent to be executed means that the Task is stopped. The operation is to jump to the specified intent is empty.
The second method is to jump from the current intent to another intent. When a common scenario needs the cooperation of other Task, it needs to finally jump back, or after completing one intent, it wants the user to complete another Task.
For another example, after buying a ticket, the user will automatically jump to the intent of "booking a pick-up and drop off machine" without waiting for the user to trigger it, so as to promote a one-stop service for the user.
Keep the slot in the current cell:
Yes: keep the intent. In the idle waiting market for the intent, the intent will be triggered and re entered. The agent will read the previous progress, and the information already obtained is still there. In addition, if there is a slot in the original intention that can be used by other intent units, it will be filled as required. In short, the mobile phone information does not need to be filled repeatedly by the user.
No: the current intent ends immediately, and all the obtained slot values All are cleared, which means that if the user triggers the intent again, he must start from the beginning, Other intent cannot inherit the original slot (provided that the slot are not used in other intent, and if the next Task to jump is asked by Request Block, and the silent slot filling units use these slot, we keep the corresponding slot for our experience).
To put it simply, whether to keep or not to keep the slot can be understood as whether to immediately forget the key information in the conversation.
In addition, for each unconnected jump relationship branch, an invisible "default end unit" is automatically configured when the system publishes it. The option to keep the slot follows the corresponding configuration in the "advanced options" in the upper right corner of the canvas.
3.3.9 Table Reading Unit
Table reading unit, as the name suggests, means to obtain data from a table, because we know that in order to facilitate management, many business data are stored in the form of tables or databases in actual production. Considering many problems like this, we can design table reading unit to use these tables, including sales situation, commodity planning table and insurance rate table, Personnel table and other documents can be read and organically combined.
Let's simulate a practical use scenario and explain the table reading unit through Hotel consultation:
Hotel name | Deposit refund method | How much is the deposit | Accepted bank cards | Return of deposit | Baby bed | The room rate |
---|---|---|---|---|---|---|
Kalima Hotel | The cash deposit will be returned immediately upon check-out | The deposit is also different for different room types, generally 1000 baht / Room / night | Only MasterCard, visa, AMEX and JCB | If the cash deposit is returned directly when checking out, the pre authorized deposit will be released within 3-4 weeks after checking out. | Children aged 1-2 can sleep | four hundred |
Charm Resort | The cash deposit will be returned immediately when checking out, and the pre authorized deposit will be released in about a month. | The deposit is also different for different room types, generally 1000 baht / Room / night | Only MasterCard, visa and AMEX | The cash deposit will be returned immediately upon check-out | Children aged 1-2 can sleep | five hundred |
Nature Hotel | If the cash deposit is returned directly when checking out, the pre authorized deposit will be released within 3-4 weeks after checking out. | The deposit is also different for different room types, generally 1000 baht / Room / night | Only MasterCard, visa, AMEX and JCB | The cash deposit will be returned immediately when checking out, and the pre authorized deposit will be released in about a month. | Children aged 1-2 can sleep | three hundred |
Hilton Hotel | The cash deposit will be returned immediately upon check-out | Deposit 4500 baht per room | Only UnionPay card (used for checkout), visa or Mastercard (deposit) | If the cash deposit is returned directly when checking out, the pre authorized deposit will be released within 3-4 weeks after checking out. | Generally, children around the age of 6 can sleep | four hundred and fifty-five |
Banyan Tree | The cash deposit will be returned immediately when checking out, and the pre authorized deposit will be released in about a month. | The deposit is also different for different room types, generally 1000 baht / Room / night | There are MasterCard, visa, AMEX and UnionPay cards issued in China | The cash deposit will be returned immediately upon check-out | Children aged 1-2 can sleep | three hundred |
Yuechun Hotel | The cash deposit will be returned immediately when checking out, and the pre authorized deposit will be released in about a month. | The deposit is also different for different room types, generally 1000 baht / Room / night | There are Master, VISA, AMEX, domestic UnionPay card, WeChat payment, Alipay payment. | The cash deposit will be returned immediately when checking out, and the pre authorized deposit will be released in about a month. | Children aged 1-2 can sleep | six hundred |
Let's take a look at this table. The top row is the header. The leftmost column is called the subject (s), the other columns are called the attribute (P), and the other parts of the table are called the object (o). The term of knowledge map is used here. Because these terms may be used in some scenarios and products, here is a brief introduction and presentation.
The main idea of the table reading unit is to check which row (column) to return. If you want to return a specific value, there are more corresponding positioning conditions. If you want to return more data, the corresponding restrictions are broader.
When the constraint of the positioning column is left blank, we can locate all All values.
Let's take a look at the example of this table reading cell, which shows that we want to find the "hotel name" column through this table reading cell. The corresponding value of the returned Hotel attribute column is stored in the slot of {Hotel attribute query result}. What is returned is judged according to the value in the slot of {hotel name}.
The above figure is a typical case of knowing SP and querying O. this form of problem is abbreviated as "s + P - → o".
"S-- → p+o" only s checks Po. For example, if I want to know all the conditions of Kalima Hotel, I can design it this way.
It should be noted that the message sent is designed by us, which is similar to this:
{slot=hotel name}
Deposit: {slot=deposit amount}
Return method: {slot=deposit return method}
Accepted bank card: {slot=bank card}
The application of the platform table also has some functions, such as displaying the deposit of each hotel in a format, and taking the quantity, maximum value, minimum value, average value of a certain value in this slot. See skill 2: application of function for details.
3.3.10 Table Writing Unit
There are two main usage directions for the table writing cell: modifying the corresponding value in the table and adding a new row.
First, let's look at the new row. In a student scenario, if a new student comes, we need to add the student number and name of the student in the student information form. What is the unique mark of this form? If it is a student ID, the student ID is our main body. The slot is written from the "student ID" slot. In addition, we can record "name"; As follows:
The value of the written entity is from the student ID. just write "name" in the name column.
When students learn a new course, the course progress should also be updated. We use the update attribute value. At this time, the positioning column is the subject column "student ID", and the entry column is the maximum progress of the course. Then the current progress comes from the "course progress" that has just been determined to be updated.
Generally speaking, the table writing unit is the reverse behavior of the table reading unit, but it should be noted that the table writing unit allows null values to be written, so please do a good job of verification before writing.
3.3.11 Attribute Reading Unit
The attribute reading function is to obtain the attribute value of the corresponding attribute from the user and save it in a slot. We often use this function in combination with other functions to help us deal with some cases that need to get property from the user CRM for processing. For example, some packages are for male users, while others are suitable for children.
The attribute reading function is divided into reading preset attribute and reading custom attribute. This attribute docking can refer to the open platform, and the attribute setting is in the user attribute module under the personalized experience menu built by the platform dialogue. The preset attribute are the user attribute that we have summarized according to various items. Some channels can be accessed without creating them by themselves, such as the user's IP, attention time, etc. Custom attribute refers to the attribute defined by us, such as whether we are a member or not.
Of course, the acquisition of these attribute property first comes from the need to bring the corresponding attribute property when creating the user. You can also put the corresponding attribute property on the user in the Task flow process through the following units.
Note: the debugging agent cannot write the attribute to the user identity, and the corresponding attribute cannot be read out.
3.3.12 Attribute Writing Unit
The attribute writing unit means to label the user with the corresponding attribute property, which is just the reverse of the function and operation sequence of the attribute reading unit.
Note: the attribute write and read functions will not be effective for the users debugging the agent, because the users here are all fake users with no corresponding attribute, and the message records cannot be seen.
3.3.13 Single Slot Interface Unit
Simply speaking, the interface unit enables the agent to obtain some information or give the user a specified response through a link. The response may vary according to the user's identity, attribute and other conditions. Of course, the interface can also be followed by an automatically executed program and then response. For the use and connection of specific interfaces, please refer to the platform product manual :
The above figure is an application of the weather agent interface. Note that the existing slot quoted here cannot be applied in the mode of "{slot=city}".
Of course, what should we do if we want to smoothly test the functions of the test BOT before the interface is developed?
Using the simulated slot filling function can quickly read to achieve the effect you want.
When on, the analog value will be filled into the receiving slot for jump after simulation. The interface URL will not be called. The above figure means to fill "success" in the corresponding slot.
When closing, call the interface URL and fill the returned data into the receiving slot.
* This function is used to debug the Process when the interface is not ready. Please close before the project is officially launched.
* Note that "slot=" should not be added to the reference slot in the interface unit.
3.3.14 Webhook Block
The Webhook Block obtains multiple returned response through requests and stores them in different slot. Its basic operation is consistent with that of single slot interface unit.
The use of the simulated slot filling function of the Webhook Block is shown in the following figure (note that the formal interface test should be used before the launch):
The above figure means to fill "0" in the "no first problem" slot, "1" in the "employee payroll" slot and "1" in the "taxpayer nature" slot.
Refer to the product manual for the interface return format 。
The difference between the single slot interface unit and the Webhook Block does not mean how many slot can be transmitted externally through the agent, but whether one or more slot are filled in through the interface.
3.4 Intent Planning Description And Notes
When setting up a Task dialogue, it is better to have a comprehensive Process chart that can provide Task logic and the response of each round of agent. In this way, the overall building speed will be faster and the changes required in the later stage of Task will be smaller.
There is no need to configure preprocessing Task at the initial stage of building Task. We may only need this part when we encounter a particularly complex or personalized scheme. We don't intend to use it directly at the initial stage of building.
When the Task is relatively complex or the original complex Task is reconstructed, we recommend that a series of intent cooperate with each other to complete a relatively complex intent. Although we have built a intent with more than 100 units for a single intent in practical applications, when there are many Task units, the arrangement and logical connection between 100 units inevitably become extremely complex. When the complexity of Task units is controlled within 10-20 units, we think it is generally easier to maintain in the later stage.
For example, in the outbound call scenario, generally speaking, a intent link will become an independent intent. Generally speaking, fixed names will be like "prologue", "product introduction", "trial conclusion" and "wechat"; In the capital retention scenario. If it is more complicated, we will break it into "ask school", "major", "mobile phone number", "name", "wechat" and so on.
Of course, we often do not know what information is required for a comprehensive Task Process chart when we are inexperienced. Here are some tips.
Task dialogue building principles
The longest line, priority construction. Go through the Process and correct it again.
After each modification, it is better to have a fixed test set to verify whether new problems will be introduced. Both positive and negative examples can be used as test sets.
Pretreatment intent:
Preprocessing means that after a intent is triggered, the intent will be preprocessed first. After the intent is preprocessed, if the intent to jump is not specified in the preprocessing, it will jump to the original triggering intent. If there is a intent to jump, the intent to jump will have priority. (Note: the priority of preprocessing is not global priority, but after the Task is triggered.)
3.5 Intent And Canvas Settings
3.5.1 Scene Setting
When creating a scene, there will be an intelligent slot filling option at the bottom. The intelligent slot filling can ignore some of the user's typos and let the Task follow the normal slot filling logic. If we need to identify the user's statements more accurately, we can increase the intelligent slot filling threshold to 0.85 or even 1.
Secondly, the preset response is automatically added, and the preset response will be displayed in the upper part of the input box below, as shown in the following figure:
Then we need to judge whether the following situations are suitable for adding preset response to the product.
- According to the historical response of the current user, it is appropriate to recommend the options that the user has selected in the non test.
- According to the high-frequency response of all users, some non private information is appropriate, but the user name and mobile phone number are inappropriate.
- Recommend according to the entity value referenced by the slot, and judge whether the added entity is suitable for direct display.
In the intent setting menu, we can do some basic operations and definitions for the overall situation of the agent.
Idle waiting time (minutes): the time intent to keep when the user has no response. During this period, the user can continue the Task Process.
Trigger knowledge point: when the user is in the Task Dialogue Flow, if the message sent cannot fill the slot, the FAQ dialogue can be triggered.
Note: when unrecognized can be filled in a whole sentence is checked, the slot will be filled, so the FAQ dialogue will not be triggered.
Reserve slot: after the cell jumps to "empty", the intent is to reserve, and the reservation will remember the values in the slot. Therefore, the user will be allowed to continue the last Process when entering directly in the life cycle, instead of directly ending the current intent (all slot are cleared), and the user will restart after entering again. Note that the intent reservation of the entire intent is set with a lower priority than the intent reservation of the jump unit.
3.5.2 Intent Release, Draft, Restoration And Effectiveness
After modifying the intent of the Task dialogue, we must remember to republish the Task dialogue.
The intent needs to ensure that it is in the effective or debugging state. Otherwise, corresponding function changes cannot be tested.
When editing intent online, we can find that our editing process saves the draft in real time. After publishing, the draft will be upgraded to a formal state. Restore can restore the changed agent to the last released state. Therefore, if you restore without publishing, it is actually equivalent to clearing all operations on the canvas since the last publishing.
On the intent management page, agent can take effect, and the edited agent Process can take effect online. Only the effective agent can successfully experience it.
All units need to have a Task connection line at the front, otherwise they cannot be released successfully.
Before the Task release validation test, we need to check whether the Task is configured with a Trigger, whether the jump and connection of the Task are complete, and whether the response content and sending sequence are configured correctly. After changing the Task, it is recommended that you test it in time to understand the situation of the Task agent. The following items are common configurations that will be forgotten.
3.6 Task Dialogue Building And Debugging Common Problems Self Inspection
Task Trigger FAQ
Sometimes we find that the Task does not run according to the designed Process, which is often caused by problems when the Task is triggered: 1. the Task has not been published, and the unpublished Task is only in draft status and is not running online; 2. if the Task is not effective, the user message cannot trigger the intent and enter the Process corresponding to the intent; 3. the Task has no trigger word or lacks a jump over design; 4. the "unintentional diagram" is opened incorrectly. If the corresponding dialogue triggers the "unintentional diagram", the Task dialogue will not make a response; 5. the "preprocessing intent" is opened incorrectly and points to or ends at the wrong branch.
When you trigger a Task, you can quickly check it according to these steps; 1. whether the Task has been released; 2. whether the Task has taken effect; 3. whether the Task has a corresponding trigger word or corresponding jump logic; 4. whether the unintentional diagram may be triggered; 5. Whether it is possible to turn on and mistakenly use preprocessing;
Task Running FAQs
If the running process of the agent does not meet the expectations, we can check the debugging information or open the debugging mode of the Task.
There are two ways to start the debugging mode: one is to select from the configuration of intent, and the other is to enter "black sheep wall" in the corresponding channel (debugging agent, experience version of agent web page or other official channels, as long as they are not shielded by the customer service system).
Maybe some people have found that their agent will appear some strange words when it is running, similar to the last two paragraphs of this figure. Most of this is because the debugging status or preprocessing of Task is enabled, and it can be manually closed if it does not want to appear.
If problems are found in the debugging process of the Task agent, they can often be checked from the following perspectives:
Observe the slot filling status of word slots during debugging: it can be said that our Task dialog building logic is developed according to the slot filling logic. When we fail to follow the specified logic, we often need to look at the current slot filling status and value.
- Check whether there is a value: when there is a value in the slot, ask to fill the slot without asking actively;
- Whether there is reset, emptying or assignment after extracting entity action:
- Whether the slot is emptied after the slot is filled, especially if the slot is filled with an operation unit, it is necessary to observe whether the operation unit configuration is correct;
- Observe whether the slot is misquoted. After modifying the name of the referenced slot, you need to observe whether the name of the referenced slot is consistent with the changed name;
- The slot filling result is inconsistent with the expectation, which may be due to the opening of the whole sentence slot filling, or the configuration of the slot filling value after the number of inquiries is exhausted;
- The slot filling times, entity values, and entity ranges are different from those just set. It is necessary to check whether the Task is associated with the correct entity and whether entity can be successfully extracted. If it has been published successfully, it can be tested later if it has checked the publishing and effectiveness. The effective time of slot is within 10 minutes;
Check the interface unit configuration: in the debugging state, if it is found that the interface unit fails, there are often several reasons:
- The return format of the interface unit is incorrect, and the return timeout;
- When the interface unit refers to the slot, it needs to directly refer to it without adding "slot=";
- When using the interface unit, you should pay attention to whether the variables in it are fixed default values or variables, and adjust them in time according to the situation. You should also pay attention to changing the interface link;
- Whether the services connected to the interface unit have been deactivated, such as the server is not turned on, the dependent services are overdue, etc;
- Whether the address of the interface unit to the test environment and the formal environment is different or not;
The Task has a cycle, which is manifested by the repeated occurrence of the same response or the flow through the repeated Process.
In the process of planning and construction, in addition to the user's success cases and failure cases, we should also consider the branches of other situations. Especially when the platform is used as the voice scene dialogue management platform, we should pay special attention to the processing logic of silence, hard of hearing, hanging up, insulting words, busy and so on. When using read / write table units, attribute read / write units, and interface units, pay more attention to the jump relationship configuration of failed (abnormal) branches.
During the debugging of Task intent, it is convenient for us to observe which step causes execution problems. It is usually useful before the Task is officially launched; Generally, this option is not enabled when a Task is enabled online.
After the Task goes online, if you want to check the problem, more formal channels will use this method after triggering the Task and entering "black sheet wall" to repeat it.
3.7 Tree Task Sorting And Building
In the process of business consultation, the consultation path expanded in tree structure is often encountered, as shown in the following figure:
As the DialogTree is a complete Process, we need to sort out the Process and determine the script before creating the agent:
- This Process can be split into several query nodes
- What trigger through
- What scripts will the agent use to advance or response after this node is triggered
We can use the dialog text above as an example to further sort out a DialogTree structure in the table as follows:
It can be seen that this structure is easy to use and understand, the maintenance logic is clear, and the use of tables can complete the overall sorting and updating.
The following are the results of the two styles of build shown in the private deployment version:
You can see that the whole is very intuitive and easy to understand. The structure is similar to the mind map, and its operation is also very simple. You only need to configure and drag the corresponding nodes.
Because of the simple structure of the cell configuration, you can jump without using the slot entity. The simplest way is to write the branch condition directly. If you need to identify more statements and situations, you can also configure the entity for generalization, as shown below:
In the implementation of this product, the intent identification result can also be directly used as a condition, and the corresponding result will be executed later.
3.8 Application Practice Of Task Dialogue
3.8.1 Case 1 Charging Agent
Phase I: Construction Along The Main Line
What does the charging case generally look like? Let's take a look at the following dialogue. Please refer to the explanation in the corresponding teaching order and complete the construction independently.
Customer: charge
Attendant: OK, what's the mobile phone number you want to recharge
Customer: 18312341234
Attendant: OK. How much do you want to charge
Customer: 100 yuan
Attendant: do you think it's right to recharge 100 yuan for 18312341234?
Customer: Yes
Service staff: OK, give me 100 yuan (get 100 yuan and recharge), and I'll be there in a minute
At this time, the word that triggers the Task is "charge". In the first round of conversation, the user's mobile phone number is asked, in the second round, the user is asked for the recharge amount, in the third round, the user is asked to confirm the provided information, and finally the user will recharge the user after receiving the money.
The above figure shows the agent Process built according to the Dialogue Flow. It can be seen that we have made some changes to several units.
When asking about the recharge amount, we added several jump conditions, which means that the service personnel's operation interface is actually limited to recharge options of 10, 20, 50 and 100. If they are not satisfied, they will ask the user again. Instead of waiting for the user to find that charging 5 yuan is not OK, it's better to inform the user of the feasible options in advance. Of course, we can also configure to explain to the customer that only the specified amount is allowed to recharge when the conditions are not met.
When asking for a mobile phone number, our slot configuration and jump options are as follows:
When asking for the mobile phone number, the preset mobile phone number entity is used. Under what circumstances can we say that the information provided by the user meets the conditions