OpenDialog Conversation Engine
Creating an architecture for your assistant is flexible in the OpenDialog platform.
In order to build robust applications, and to be able to troubleshoot your design, it is critical to understand how the conversation engine decides where to look for a next action.
Starting and open behavior
Starting components, for instance a turn that is a starting turn, are only considered when you join a level for the first time. After the first interaction, they are no longer considered.
Open turns are considered only after the starting turn is over. They are always considered from that time on.
Components can be both open and starting.
Because of these rules, it is very important for a designer to consider the behavior for any component.
Conversation engine at the start of an interaction
At the start of an interaction, the conversation engine
Explores all starting conversations, all the starting scenes within these conversations, all the starting turns within those scenes and any request intents associated with those starting turns will be considered as possible starting intents
Considers the incoming utterance and attempts to match it to one of the possible starting intents
If the match is successful the conversation state is updated to that intent and we are now in a fully defined conversation state down to the level of an intent.
How a user intent is selected
When there are multiple available user intents in your conversation design, the conversation engine needs to decide which one to select.
First, the conversation engine will run the interpreter associated with each available user intent in the conversation design. The interpreter will take the user's input and will attempt to match an intent with it. If the interpreted intent name matches the expected intent name in the conversation design, then we will continue with the intent. If the interpretation does not match, or provides no interpreted intents, then we will discard the expected intent from consideration.
![A screenshot of the OpenDialog Designer. It shows two user intents, one called Update Policy and another called Add Driver.](https://docs.opendialog.ai/~gitbook/image?url=https%3A%2F%2F3203401256-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FdP6xFXXyeBbibro1Ywnq%252Fuploads%252FGJ0mzRRrSliwUue65RZA%252FScreenshot%25202024-08-23%2520at%252015.30.55.png%3Falt%3Dmedia%26token%3D200604fc-d874-46b7-a315-dbdaadc22af8&width=768&dpr=4&quality=100&sign=c59b39d6&sv=1)
Using the example from the screenshot above, if the user were to be in this conversational position and says "add my partner to my policy", then the conversation engine will run two interpreters: one for UpdatePolicy
and one for AddDriver
. If our interpreters are working well, it would match the user's input to the AddDriver
intent. This would mean that the conversation engine will discard the UpdatePolicy
intent. As there are no additional conditions on the AddDriver
intent, it will be selected by the conversation engine.
If both interpreters were to return intents that match, then the conversation engine will select the intent that appears first. In the example from the screenshot above, this would mean the UpdatePolicy
intent would be selected if both intents were matched by their interpreters.
Intent prioritisation for Semantic Intent Classifiers
As Semantic Intent Classifiers allow you to define intents and sub-intents, it is more likely that interpreters using your classifier will match more than one intent. To ensure that you do not need to carefully order intents in the Designer, Semantic Intent Classifiers return their intents with a priority ranking. Sub-intents are ranked the highest priority, as they are more specific and granular. Whereas intents are ranked as a lower priority, as they are general and broad.
![A screenshot of the OpenDialog Designer. It shows two user intents, one called Manage Policy and another called Update Milage.](https://docs.opendialog.ai/~gitbook/image?url=https%3A%2F%2F3203401256-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FdP6xFXXyeBbibro1Ywnq%252Fuploads%252FOxHElkoyjCT14I5pvFQz%252FScreenshot%25202024-08-23%2520at%252015.40.04.png%3Falt%3Dmedia%26token%3Df7d3a641-0bd5-49a6-b1d9-8ab439137f02&width=768&dpr=4&quality=100&sign=5aaba86d&sv=1)
Using the example from the screenshot above, let's presume that both intents are connected to a Semantic Intent Classifier in which ManagePolicy
is an intent and UpdateMilage
is a sub-intent of this intent. Under regular circumstances, if both intents were to match, then ManagePolicy
would be selected as it appears first. However for Semantic Intent Classifiers, when both intents match, the sub-intent will be selected. Therefore in this example, an input of "update my milage" will match both intents, but will UpdateMilage
be selected by the conversation engine as it has a higher priority as a sub-intent.
During an interaction, these prioritization rules apply
If the matching user intent defines a transition, the engine will follow that transition.
![](https://docs.opendialog.ai/~gitbook/image?url=https%3A%2F%2F3203401256-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FdP6xFXXyeBbibro1Ywnq%252Fuploads%252FY0iyhELQszNJVedzjh39%252F2023-06-20_16-05-02.png%3Falt%3Dmedia%26token%3D28746797-13a5-4a53-b293-d73f04abd61f&width=768&dpr=4&quality=100&sign=ab199483&sv=1)
If there is no transition, look for a matching app response intent within the turn.
![](https://docs.opendialog.ai/~gitbook/image?url=https%3A%2F%2F3203401256-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FdP6xFXXyeBbibro1Ywnq%252Fuploads%252FspHUfUeSK98YYuppjq5x%252F2023-06-20_15-55-55.png%3Falt%3Dmedia%26token%3Dc516faa2-29a0-4353-828b-f0422597fe6f&width=768&dpr=4&quality=100&sign=15225009&sv=1)
If there is no transition and no response intent is present in the turn, the engine will look for a next intent in another turn within the same scene.
![](https://docs.opendialog.ai/~gitbook/image?url=https%3A%2F%2F3203401256-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FdP6xFXXyeBbibro1Ywnq%252Fuploads%252F062xy21N0jODROoBIJLD%252F2023-06-20_15-59-11.png%3Falt%3Dmedia%26token%3De58bb6f9-e817-4b83-805a-3553146f5941&width=768&dpr=4&quality=100&sign=b7f8d734&sv=1)
![](https://docs.opendialog.ai/~gitbook/image?url=https%3A%2F%2F3203401256-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FdP6xFXXyeBbibro1Ywnq%252Fuploads%252FVJJ3hzjG9s3bCpJJpfKH%252F2023-06-20_15-59-35.png%3Falt%3Dmedia%26token%3D4ec24fc1-e768-40d8-88cb-32d9a29133cd&width=768&dpr=4&quality=100&sign=a6d8d4e3&sv=1)
If an intent has the completing behavior: after this intent is executed we go back up to the scenario level.
If none of the rules in this section apply, then a no match is triggered, either local or global (scenario level).
Last updated