Search code examples
chatbotwatson-conversationwatson

Watson chatbot - conversation returns to parent level


I'm trying to familiarize myself with Watson Conversation. So far I've created a simple conversation consisting of several intents and dialogs.

My Improve Fitness dialog responds with:

OK, so have you any running experience?
Thats a great start. Have you ran before?

It recognises the #improve_fitness intent which consists of:

complete a 10K
complete a 5K
couch to 5K
general fitness
get a little faster
get healthier
get my time down
I want to get fit
I want to improve my fitness

From this I created three child dialogs: Improve Fitness - No Experience Improve Fitness - Some Experience Improve Fitness - Lots Of Experience

If a user triggers either of them a response is given. Based on the response, the user could say something which could trigger another. My problem is that after the first child is triggered(regardless of which one it is) the conversation seems to move back to the parent level and if something is said which should trigger another child, my bot does not recognise the input. Is there any way around this?

Here's a screenshot of what I'm looking at. depending on the response I recieve from either Improve Fitness - No Experience, Improve Fitness - Some Experience or Improve Fitness - Lots Of Experience, I may say something which should take me to another of these.

enter image description here


Solution

  • Conversation is stateless. When you make your first call, you will get a context object back. This is what is used to maintain state.

    On further calls, you need to send the context back, so it remembers where it was.


    Updated based on comment and picture.

    OK. I'm just working in Bluemix at the minute.

    By default if conversation can't find a match in the branch, it will fall back to root and try and find a match there.

    You can prevent this by adding a node at the end of the branch with an anything_else condition, which gives a prompt to the correct responses, and then jumps to the wait for user input from the parent node.

    Most common cause of falling out if you typed something in correctly is more training needed. Intents won't trigger as matched if < 0.2 confidence.

    You can add the following in the output text to see the scoring in the try it out box:

    <? intents ?>