How to make bot silent or answer "Sorry, I don't know this question"

Hi, I want to make my bot silent or answer “Sorry, I don’t know this question” when users ask questions that haven’t yet listed in file nlu.yml

How can I do that?

Thank you <3

Hi

  1. Add Nlufallback in your config.yml file and set a threshold value against it.
  2. Create a action around it in actions.py and add it into the rules.yml

This will get invoked whenever user text is detected with very low confidence Link to follow Nlu Fallback

1 Like

Hi @mai_bui you can you default_fallback.

For example:

In config.yml

policies:
  - name: MemoizationPolicy
  - name: TEDPolicy
    max_history: 5
    epochs: 100
  - name: RulePolicy
    nlu_threshold: 0.4
    core_threshold: 0.4
    fallback_action_name: 'action_default_fallback'

In domain.yml

utter_default:
    - buttons:
        - payload: /main_menu
          title: Main Menu
      text: "I'm sorry, I didn't quite get you? Please try again.."

Hope this will solve your issue, good luck!

1 Like

Thank you for your answer ^^. My problem is fixed :heart_eyes:

Thank you for your answer ^^. My problem is fixed :heart:

@mai_bui no worries.

Sorry. But when I add policy and utter like that, when I ask questions trained before, it responses “I’m sorry, I didn’t quite get you? Please try again…”

@mai_bui I have given you a global solution, if your bot is not trained based on training examples, then it will return this.

@mai_bui delete the older trained model and trained again and run.

Good Luck!

1 Like