Prioritizing Intents

A common question that comes up is how to handle where the end user makes two utterances, but you only want to take action on one.

The most common being someone saying hello, versus saying hello with a question. You would want the question to take priority.

It’s very easy to do. You just do the following:

conv-150117-0

  1. Create your first node with a condition of True and create your priority intents under this. Set your top node to jump to the first in that branch.
  2. Create your second node which handles greetings.
  3. Add a True node at the end of your important intents, and let it jump to greeting condition.

And that’s it! But that is the old style conversation way. Just before the new year a new version of conversation was released that makes this so much more simple.

conv-150117-1

The magic is in the first node.

conv-150117-2

Here we check to ensure that a greeting hasn’t been mentioned, then check each important intent.

With this method you don’t need any complex branches or jumping around. One important thing is to ensure that your less important intents do not have any training data that may cause it to pick it over the important intents.

Sample workspaces available.

 

 

8 thoughts on “Prioritizing Intents

  1. I don’t get it. In the second (new version) example, why do we want #Greeting not to be true? If it should be about prioritization, both greeting and important intent should be true and then important intent prioritized… Or what am I missing? In this scenario, what would happen if user greets and asks about an important intent in one sentence? Thank you for answering and – lovely blog, thanks!

  2. On second thought, why can’t we give lower priority to the greeting intent. That way, when we hit our more prioritized intent.. it will be executed. If it is really a greeting, it will come there eventually.

  3. @praveen. This is an old post. Watson Assistant has features now that makes this post redundant. One of the reasons I haven’t updated in a while. 🙂 Everytime I start something to write, a feature gets added to make it out of date.

  4. Hi Simon, I’m struggling with a similar situation. How would you handle: “I know it works on iPhone 8 but what about other models?”

    Thanks for your help!

  5. Hello,

    Can you still access the intent array? It isn’t working for me, would like to see the 2nd highest intent in the watson assistant dialog. Is it named something else now?

    Thanks,
    David

Leave a Reply