Search code examples
ibm-cloudwatson-conversation

How to deal with an unexpected answer in Watson Conversation?


If at a specific step of my dialog, the end user answers an unexpected word and the process moves to "anything_else" point (that would be something like: "I don't understand, could you repeat?"), how do I get the dialog to move back to the previous question, for the user to try again?


Solution

  • There is no easy way or automatic method to achieve what you ask. However, if you set up your dialog nodes to consider the question that follows re-direct, i.e. as one of the root nodes, then the conversation flow should jump to this point in the conversation flow.
    Alternatively you could create a dialog node that sits above the anything_else node, but performs a similar role. This dialog node could still output the text "I don't understand.." but then continue back to the original point in the dialog structure.
    A final solution, but not one I would implement myself, could be to store the json context packet from not just the current answer, but also from the previous set of answers. This would allow you to roll back to any point you stored.