I'd like to construct a branch such that Watson can provide a brief response to a specific question, then provide more details if a user prods for more.
An example interaction might be:
User: "I'd like to know about X."
Watson: "Sure, ... . Would you like me to go into more detail?"
User: "Yes."
Watson: "Okay, ... ."
The first two lines are straightforward from the tutorial given by IBM. The second two I am unsure of how to deal with. How do I create an intent out of simply "Yes."? And how can I create a conditional statement using the last node visited in the conversation tree (which I believe might help)?
There is a couple of ways to approach it.
You just need to create an intent with five versions of yes.
yes
sure
yep
of course
yes I would
y
Then just check for #Yes
in your condition.
You need to test it with your other intents to ensure they do not interfere with each other.
Entities can be handy for short known responses like this. You have a limited scope of how people may say yes, and it does not interfere with your entities. However it may not catch every version of yes if there are spelling mistakes. You can then look for @Yes
or @YesNo:Yes
if you have grouped them.
Even in both cases it may be that the person does not answer how you would expect them to. So you can create a true
node at the bottom of the branch. In that have your output say something like.
Sorry I didn't understand, Would you like me to go into more detail? You can answer Yes or No.
Then have your UI make the Yes/No clickable, but pass the text back to conversation to give the correct response.