'How to get IBM Watson's intents / dialog nodes to work in tandem with actions

At a high level, I am trying to build a Watson Assistant that:

(1) Follows a fixed conversation structure (currently containing 25 steps)

(2) At each step, evaluates whether the user is saying anything that might be considered as a safety issue / 'red flag' and, if so, present emergency info and end the conversation, otherwise continue with the next conversation step in the fixed sequence referred to above

I have implemented the fixed conversation structure (item 1 above) using Watson's actions steps. Works well.

I have also defined an intent I call 'RedFlag' and provided 5 examples so far (will be adding more) of what users may say to trigger this. I also have a dialogue node which detects this intent and presents emergency info. Works well.

Issues I am struggling with:

a) I am not sure how to end the conversation once the RedFlag intent is detected and the assistant presents the emergency info

b) I am not able to get the conversation actions sequence to work in parallel with intent detection and activation of the related dialogue node, basically my conversation structure works only if there are no defined intents / dialogue nodes. As soon as I have an intent (in this case the RedFlag one) the assistant ignores the conversation actions / steps and simply waits for the user to say something that matches the defined intent. Its like an either / or situation - either I step through the conversation without any intents or I'm stuck within the intent detection and none of the fixed conversation sequence / steps get activated.

Essentially, I am trying to have a fixed conversation structure while also having a number of 'waiting' intents / dialogue nodes that can be activated at any point during the fixed conversation steps, depending on what the user says.

This is a crucial point for us - I need to keep the fixed conversation flow going and only interrupt it if a specific intent is detected, then either exit (in the case of the RedFlag intent) or activate the appropriate response from the related dialogue / action node and then return to the next question in the fixed sequence.

Any help greatly appreciated! Thanks!



Solution 1:[1]

You should consider adding the Red Flag intent as a Topic change, or in classical Assistant terms a not returnable digression.

See: https://cloud.ibm.com/docs/watson-assistant?topic=watson-assistant-change-topic

Solution 2:[2]

The easiest way to do this is to have your orchestration layer (Dialog) or your pre-webhook (Actions Watson Plus) do the work.

After that two options.

  1. Have the red flags checked directly in the code.

  2. Create an entity of red flags and then check if the entity was triggered in your code.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 chughts
Solution 2 Simon O'Doherty