3

I'm working on a chatbot project based on Facebook's Wit.ai and was wondering if it is possible to set a default intent?

For example, my bot currently supports only a handful of questions, such as "Where are you located?" or "What is your phone number?", each of these questions has an intent and story associated with it but if someone asks something the bot doesn't understand, wit seems (I haven't been able to find any info about this) to choose a story at random and execute it.

I would like to set a default intent that will respond with something like "I don't understand what you mean." in the event that no other intent is recognized. Is it possible to do this? Specifically, I would like to know if there is an officially accepted way to do this as I currently have a way to achieve this but it is a bit hacky and requires me to edit the wit package from facebook which I would prefer not to do.

user3282276
  • 3,674
  • 8
  • 32
  • 48

2 Answers2

4

There is no any functionality available yet in wit.ai

But you can get the required functionality by using the confidence value returned by the wit api. You can set a threshold value of the confidence and if the value falls below your threshold return a custom message. you can handle this functionality in your action function implementation.

For further reference look at this post.

Community
  • 1
  • 1
Ravi Teja
  • 377
  • 4
  • 15
0

You could also use api.ai , which by default provides a default fallback intent. In default fallback event, if api.ai does not understand the input or does not have an answer , it would reply with "I did not understand what you just said"

Neha Creado
  • 79
  • 1
  • 4