Rasa X not given correct actions for properly detected intents

Rasa X is detecting the intents properly however not giving the actions appropriate to those intents and rather giving default fallback action. For eg. intent appointment should respond with utter_appointment however giving default_fallback_action.

Can anyone help me in this regard?

hi @Purbasha10 - welcome to the forum!

Rasa X does not influence how what predictions Rasa Open Source is making, so you should be able to reproduce this behaviour when running rasa shell, too.

If you are getting a fallback action, it could be that the confidence threshold is set too high.

Do you have the fallback policy in your config.yml ?

I had set the nlu_threshold to 0.4 and core_threshold to 0.3. Yes I had included the fallback policy in the config file. However, since it was giving fallback action for almost every query, I have removed the default fallback action from all the files(config, domain, nlu and stories). However now it is detecting the intents properly but giving response of other intents. Screenshot below. Intent is proper(payment_mode) but response in utter_pat_marketplace_subscriptiondeal.

hi @Purbasha10 You can try runnnig this in the command line with rasa shell --debug, that should give some helpful info about why the wrong action is being predicted.

However, if these are FAQs which always receive the same answer, you may want to use retrieval actions or the mapping policy.

@amn41 - I think this might be related to this one. I had a similar outcome where upon trying it in rasa interactive, I get the right actions.

But when I deployed it to production and also viewed it inside Rasa X, it was going to the fallback action literally every time, even when I only triggered the intent to load the slots with metadata and did not pass the user’s message.

How does the mapping policy work exactly? I referred to the documentation and included triggers in the domain file as below:

  • telemedicine_types: triggers: utter_telemedicine_types
  • telemedicine_how: triggers: utter_telemedicine_how
  • telemedicine_helphow
  • telemedicine_livenow: triggers: utter_telemedicine_livenow

I have added proper indentation to the triggers line however while i do rasa train after the new domain file it gives the below error:

Traceback (most recent call last): File “/home/ubuntu/anaconda3/bin/rasa”, line 8, in sys.exit(main()) File “/home/ubuntu/anaconda3/lib/python3.7/site-packages/rasa/main.py”, line 91, in main cmdline_arguments.func(cmdline_arguments) File “/home/ubuntu/anaconda3/lib/python3.7/site-packages/rasa/cli/train.py”, line 76, in train additional_arguments=extract_additional_arguments(args), File “/home/ubuntu/anaconda3/lib/python3.7/site-packages/rasa/train.py”, line 50, in train additional_arguments=additional_arguments, File “uvloop/loop.pyx”, line 1456, in uvloop.loop.Loop.run_until_complete File “/home/ubuntu/anaconda3/lib/python3.7/site-packages/rasa/train.py”, line 88, in train_async domain = await file_importer.get_domain() File “/home/ubuntu/anaconda3/lib/python3.7/site-packages/rasa/importers/importer.py”, line 242, in get_domain domains = await asyncio.gather(*domains) File “/home/ubuntu/anaconda3/lib/python3.7/site-packages/rasa/importers/rasa.py”, line 66, in get_domain domain = Domain.load(self._domain_path) File “/home/ubuntu/anaconda3/lib/python3.7/site-packages/rasa/core/domain.py”, line 100, in load other = cls.from_path(path) File “/home/ubuntu/anaconda3/lib/python3.7/site-packages/rasa/core/domain.py”, line 110, in from_path domain = cls.from_file(path) File “/home/ubuntu/anaconda3/lib/python3.7/site-packages/rasa/core/domain.py”, line 123, in from_file return cls.from_yaml(rasa.utils.io.read_file(path)) File “/home/ubuntu/anaconda3/lib/python3.7/site-packages/rasa/core/domain.py”, line 133, in from_yaml return cls.from_dict(data) File “/home/ubuntu/anaconda3/lib/python3.7/site-packages/rasa/core/domain.py”, line 162, in from_dict **additional_arguments, File “/home/ubuntu/anaconda3/lib/python3.7/site-packages/rasa/core/domain.py”, line 413, in init self.intent_properties = self.collect_intent_properties(intents, entities) File “/home/ubuntu/anaconda3/lib/python3.7/site-packages/rasa/core/domain.py”, line 349, in collect_intent_properties intent = cls._transform_intent_properties_for_internal_use(intent, entities) File “/home/ubuntu/anaconda3/lib/python3.7/site-packages/rasa/core/domain.py”, line 290, in _transform_intent_properties_for_internal_use properties.setdefault(USE_ENTITIES_KEY, True) AttributeError: ‘NoneType’ object has no attribute ‘setdefault’