1
votes

Everytime Watson can't answer a question or a comment it pulls up the "everything_else" node that says 'Sorry, I don't know bla bla bla". I want Watson to send and specific message to the user after three failed attempts. How do I do it?

I read this page (https://console.bluemix.net/docs/services/assistant/dialog-slots.html) but I could not apply the solution given.

My 'anything_else' Json

{
  "output": {
    "generic": [
      {
        "time": 2000,
        "typing": true,
        "response_type": "pause"
      },
      {
        "values": [
          {
            "text": "Ainda não tenho todas as respostas, talvez reformular a frase ajude..."
          },
          {
            "text": "Perdão, acho que não entendi. Tente inserir palavras chave ou reformular a frase."
          },
          {
            "text": "Sorry! Essa eu não sei... Tente algumas palavras chave,     pode me ajudar a entender!"
          }
        ],
        "response_type": "text",
        "selection_policy": "random"
      }
    ]
  }
}
1

1 Answers

2
votes

There are two approaches.

Approach 1:

Change your responses from random to sequential. This works fine if your users are not expected to hit that topic that often, or are "tyre kickers" (playing with system, but not using as expected).

For example, in an off topic you may give 2 responses to it, but the third tells them to stop playing.

Approach 2:

Have two anything_else nodes. The first node checks if a counter is over a certain value. The logic for that would be something like:

If $counter < 3

In the node you would give the normal "I don't understand", and increment the counter.

Important Make sure you have created a default $counter variable and set it (in your welcome node is good).

The second anything_else node after it would give your expected response you want. You can optionally reset the counter at this point.

Added option would be to have a flag that checks if you hit the first anything_else. If you didn't then reset your counter.

An example of this would be if someone asked too many off topic questions in a row you might want to stop them, but if they go on topic you reset to prevent misunderstandings being picked up as off topic.