Dialogue Tree
This chapter will explain: what is a dialogue tree, and how to create a dialogue tree type of skills on the platform.
Definition and concept of dialogue tree
-Dialogue Tree: These skills are built like a "tree", which consists of hierarchical tree-like branches. The elements in the branches are nodes, and the parent-child relationship establishes a level between the nodes of the tree. According to the user's question and branch selection, a corresponding response is given. For example, if you ask about the reason for food damage, you need to give different responses and follow-up treatments according to the date of purchase and the damage.
-Node: The smallest unit that composes the dialogue tree, which is divided into ordinary nodes and several special nodes: -Ordinary node: Dialogue tree The dialogue tree stops to ask and obtains the user's reply information. Many ordinary nodes are connected according to the hierarchy and the parent-child relationship to form the dialogue tree. -Start root node: The root node of the dialogue tree. When the user triggers the dialogue tree skill, enter this node and start the subsequent process. -Abnormal end node: In any node, if the agent cannot continue to move forward after the number of queries exceeds the maximum limit, it will exit the dialog tree abnormally. This is a technique for giving the configuration of the abnormal end node. -Successful end node: When the process is complete, that is, when the dialogue tree reaches a child node, the agent will directly send the words to successfully end the node configuration after sending the copy of the child node.
caution
When the abnormal end is over, the agent will first reply the abnormal end speech technique, and then reply successfully to end the speech technique. Therefore, please ensure that the successful conclusion of the speech technique has a strong tolerance.
-User said: When the message sent by the user meets any of the conditions configured in the "User said", it will jump to the node corresponding to this "User said".
For example: In the root node, the agent asks the user "whether they have purchased insurance products". Two child nodes are connected to the next level of the root node. The "User Say" of one child node A is configured as "purchased", and the "User Say" of child node B is configured as "not purchased".
In this way, when the agent is at the root node and the user responds with "No, I did not purchase insurance products", the agent will jump from the root node to the child node B ("user said"-"no purchase").
-Agent say: As long as the agent jumps to this node, it will actively send a message. Then wait for the user to reply, and select the next level jump node according to the reply information.
-Words to be filled slot: Collect key information from the user to determine which sub-node the user will jump to in the future.
-Agent Reply: As long as the word-to-fill slot collects the user's reply message on this order, the agent will actively send the message first, and then jump to the child node.
Dialog tree building
Create a dialogue tree
- On the skill management page, click the "New Skill" button and select Type as Dialog Tree to create a new dialog tree skill:
- Fill in the name and category of the dialogue tree, and select or create an Intent as the intention to trigger the skill. When the user's message is recognized as this intent, the agent will trigger the skill:
- After selecting the intent, you can click the "Collapse detail" button to quickly view the content of the intent, or click the "Edit intent" button to modify the intent directly:
- After adding the skill description, click Save. The newly created dialogue tree will be displayed in the skill list. Click the Enter button to start the complete process of building the dialogue tree:
Canvas operation method
After clicking the Enter button, a new process canvas page will open, and the dialogue tree is built here. Let's take a look at how this canvas works:
- Hovering the mouse over a node or clicking the small button on the left side of the node can evoke node operations: Create Child Node, Edit Node, Copy Node, Children Only, Delete Node:
Double-click the node to quickly edit the node:
Drag the node to change the position order and parent-child structure of the node:
- Click the small triangle to the left of the node to quickly expand and collapse the node:
Initialize the node
- When you enter the skill canvas for the first time, there are three initial preset preset nodes: start root node, successful end, abnormal end
- In the starting root node, you can see that the "user said" is the trigger intent selected when creating the skill. The intention will be synchronized with the outside of the skill when the modification is triggered here
After the editing agent was triggered with this intention, the first question answered:
- In the successful end node and the abnormal end node, you can edit the end words of the agent in the two end scenarios, and the configuration method is similar to the knowledge question and answer.
Custom node
- According to the dialog flow of the agent, a custom node can be created. In the node, you can configure the entry conditions and response content of the node
caution
-The agent's response strategy of the unit is the same as that of the agent's reply. If it is different, the agent's strategy will prevail by default. -When the jump condition of the parent node in the dialogue tree does not exist, it will jump to the first one by default
Dialogue tree settings
- Complete the dialog tree construction, and you can change some setting information according to your needs.
- Click the "Train and Publish" button in the top bar of the page. When it is prompted that the training is successfully published, the agent can start a conversation.