I am creating a mental health chatbot. If the users say’s something about his personal life, we cannot have an intent for it right. So in this case what should be done. Like should we proceed to something like a normal reply without matching the intent or anything else?
Hi @andy0699, welcome to the forum!
You can create an
out_of_scope intent for messages your bot can’t handle. We do this in our demo bot here. You’ll need to come up with a generic response to keep the conversation flowing, something like
“I’m sorry, I can’t help you with that”, and then you can also remind the user of what your bot can do, to steer them back to the happy path. Read more about that here.
hey @fkoerner, thanks for your reply. What if whatever the user has said is something that needs to be understood and replied to with a proper answer?
You mean an intent your bot should be able to handle but your bot failed to recognize it?
You can use two-stage fallback which kicks in if the confidence for an intent falls below a certain threshold (i.e. your model is not sure which intent it should be). The bot will ask the user to either confirm that the predicted intent is right, or deny. If they deny, they’ll be asked to rephrase the question so that the bot can try to predict an intent again. Read more about two-stage fallback here