Difference between revisions of "Conversation Flows"
(Created page with "600px|link=http://www.wiki.wisevoice.ai") |
(→Connections) |
||
(10 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
− | [[File:Demo_canvas.png| | + | |
+ | Dialogs based on conversation flows are guided dialogs. With conversation flows you create a dialog tree where you define all the branches of the conversation. Here you can also connect different services and scripts to match business logic requirements. | ||
+ | |||
+ | [[File:Demo_canvas.png|800px|link=http://www.wiki.wisevoice.ai]] | ||
+ | |||
+ | Conversation flow are trigged either by an event or by another flow. | ||
+ | Flows are build using 6 building blocks. Read more about each building block on it's dedicated page: | ||
+ | *'''Events''' | ||
+ | *'''Intents''' | ||
+ | *'''Messages''' | ||
+ | *'''Entities''' | ||
+ | *'''Scripts''' | ||
+ | *'''Services''' | ||
+ | |||
+ | In the example above we have a flow that is triggered by the Start Event. The Start Event is the most common type of event and is triggered when the user opens the chat or calls in. | ||
+ | The Start Event is usually connected to a message node, that contains the welcome message. This means that when the user opens the chat he will instantly receive the welcome message. | ||
+ | After sending the welcome message, the virtual agent will wait for user input. When receiving the user input it will detect the intent and continue on that branch. If for example the agent couldn't detect the intent it will select the "default fallback" intent, that is configured as a fallback; thus it will send the user the message from the "mesaj fallback" and will wait for user input again. The "messaj fallback" node is connected to all the intents from the previous state, creating a loop. | ||
+ | |||
+ | |||
+ | The topics bellow describe the mechanics of the conversation flows. | ||
+ | |||
+ | |||
+ | == Stop conditions == | ||
+ | |||
+ | In more complex scenarios that also contain scripts and services the agent might pass through multiple nodes in the flow before generating the response for the user. | ||
+ | The agents stops and returns a message in 3 situations: | ||
+ | # It reached the end of the flow | ||
+ | # It reached a node that is followed by intents, thus user input is required | ||
+ | # It reached an entity node that requires user input | ||
+ | |||
+ | == Component library == | ||
+ | |||
+ | Every node on the canvas holds a reference to a component. The node receives the name and the configuration of the component but it is only a reference to it. This means that when deleting the node the component is not deleted and also that we can reference the same component on different branches of the conversation. | ||
+ | All component can be browsed in the component library. | ||
+ | |||
+ | |||
+ | == Connections == | ||
+ | |||
+ | The default way of adding new nodes to the flow is by using the "Add new connection" button on an existing node. This will created a node connected to the parent node. | ||
+ | When creating nodes from an existing node you can't create event nodes, as events only exist as entry points. There is a dedicated button on the left side of the screen for creating events. | ||
+ | |||
+ | |||
+ | If you do not want to create a new node, but to connect to an existing one you can use the connections tab. | ||
+ | In the detail view of a node you can find all the information about the component and a connection tab. From the connection tab you can create connections to existing nodes by pressing "Add connection" | ||
+ | |||
+ | |||
+ | When having more than one destination node connected to the same source node you can use the connections tab to define conditions for different branches. | ||
+ | |||
+ | If the destination node is an intent node, then the condition will be implicit. The flow will continue on that branch only when matching that intent. | ||
+ | For destination nodes that are not intents (messages, entities, scripts, services) you can configure custom conditions based on different session variables, such as entities extracted from the user or the current time of day. (e.g. if age < 20 than go to message1; else go to message2;). | ||
+ | |||
+ | ==Retraining== | ||
+ | |||
+ | After doing a change to a flow press the 'Retrain' button to update the model. | ||
+ | If you only update one component you can press the 'Retrain' button inside the detail view of that component. | ||
+ | To retrain the whole flow press the 'Retrain' button in the canvas. | ||
+ | |||
+ | The retrain time grows with the size of the flow and the number of entities inside the flow. You can not start a second retrain while the first one is still in progress. |
Latest revision as of 17:55, 22 January 2020
Dialogs based on conversation flows are guided dialogs. With conversation flows you create a dialog tree where you define all the branches of the conversation. Here you can also connect different services and scripts to match business logic requirements.
Conversation flow are trigged either by an event or by another flow. Flows are build using 6 building blocks. Read more about each building block on it's dedicated page:
- Events
- Intents
- Messages
- Entities
- Scripts
- Services
In the example above we have a flow that is triggered by the Start Event. The Start Event is the most common type of event and is triggered when the user opens the chat or calls in. The Start Event is usually connected to a message node, that contains the welcome message. This means that when the user opens the chat he will instantly receive the welcome message. After sending the welcome message, the virtual agent will wait for user input. When receiving the user input it will detect the intent and continue on that branch. If for example the agent couldn't detect the intent it will select the "default fallback" intent, that is configured as a fallback; thus it will send the user the message from the "mesaj fallback" and will wait for user input again. The "messaj fallback" node is connected to all the intents from the previous state, creating a loop.
The topics bellow describe the mechanics of the conversation flows.
Stop conditions
In more complex scenarios that also contain scripts and services the agent might pass through multiple nodes in the flow before generating the response for the user. The agents stops and returns a message in 3 situations:
- It reached the end of the flow
- It reached a node that is followed by intents, thus user input is required
- It reached an entity node that requires user input
Component library
Every node on the canvas holds a reference to a component. The node receives the name and the configuration of the component but it is only a reference to it. This means that when deleting the node the component is not deleted and also that we can reference the same component on different branches of the conversation. All component can be browsed in the component library.
Connections
The default way of adding new nodes to the flow is by using the "Add new connection" button on an existing node. This will created a node connected to the parent node. When creating nodes from an existing node you can't create event nodes, as events only exist as entry points. There is a dedicated button on the left side of the screen for creating events.
If you do not want to create a new node, but to connect to an existing one you can use the connections tab.
In the detail view of a node you can find all the information about the component and a connection tab. From the connection tab you can create connections to existing nodes by pressing "Add connection"
When having more than one destination node connected to the same source node you can use the connections tab to define conditions for different branches.
If the destination node is an intent node, then the condition will be implicit. The flow will continue on that branch only when matching that intent. For destination nodes that are not intents (messages, entities, scripts, services) you can configure custom conditions based on different session variables, such as entities extracted from the user or the current time of day. (e.g. if age < 20 than go to message1; else go to message2;).
Retraining
After doing a change to a flow press the 'Retrain' button to update the model. If you only update one component you can press the 'Retrain' button inside the detail view of that component. To retrain the whole flow press the 'Retrain' button in the canvas.
The retrain time grows with the size of the flow and the number of entities inside the flow. You can not start a second retrain while the first one is still in progress.