Fallback
Annotation | <Fallback> |
---|---|
Definition | Specifies an OSCOVA fallback intent. |
Attributes | Optional Context : Explicitly specifies a context for the fallback. |
Occurrence | One <Fallback> element MAY occur as a child of <Intent> element |
Fallback defines an intent that must be invoked when no other intent elements are matched. To create a fallback intent in SIML Modern simply specify an empty <Fallback/>
element within an intent.
Example
SIML
<Intent Name="GlobalFallbackIntent">
<Fallback/>
<Response Text="I am sorry. Could you please rephrase that for me?"/>
</Intent>
Explanation
The above intent creates a global fallback whenever the user message doesn't match any known intent with enough confidence.
Contextual Fallbacks
If may be handy to create fallbacks for intents with particular contexts. For this the <Fallback>
element offers a Context
attribute that could be used to specify a context name for which the fallback should be triggered.
<Intent Name="validate_user">
<Expression Value="@sys.email"/>
<Context Name="validate-user-con"/>
<Action ID="validate-user-action"/>
</Intent>
<Intent Name="validate_user_fallback">
<Fallback Context="validate_user_con"/>
<Response Text="That doesn't seem like an email. Kindly retry."/>
</Intent>