Intent Detection and Resolution
For dialog flows designed with the Visual Flow Designer, intents are detected (and resolved) automatically when there is no active flow.
This means the dialog engine performs intent resolution on the user message when:
- The session is started with a user message.
- A previous top-level task flow has just been ended, and the action specified by the End Flow component does not match another event (default transition).
This differs from YAML-based dialog flows, where you have to explicitly add a
System.Intent
component to the dialog flow. In the Visual Flow Designer, there isn't a System.Intent
component.
When the dialog engine performs intent resolution, it stores the result in the
pre-defined variable named system.nlpresult
(which you can access with the expression
${skill.system.nlpresult.value}
).
In addition it raises an event named
system.intent.<IntentName>
for the intent match that is found or
system.intent.unresolvedIntent
when
no intent match is found. In the Main Flow, you create the
mappings between the intents and the flows that need to be
invoked for those intents.
The automatic detection of intents in the Visual Flow Designer is similar to how digital assistants already work, with the main difference being that digital assistants support non sequiturs within an active skill when the user input is unresolved.