# Fallback problem

**URL:** <https://forum.rasa.com/t/fallback-problem/55695>\
**Category:** Rasa Open Source\
**Created:** [October 9, 2022, 9:06pm UTC](https://forum.rasa.com/t/fallback-problem/55695 "2022-10-09T21:06:35Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![MatsG](https://avatars.discourse-cdn.com/v4/letter/m/7993a0/32.png) [@MatsG](https://forum.rasa.com/u/MatsG)\
**Post date:** [October 9, 2022, 9:06pm UTC](https://forum.rasa.com/t/fallback-problem/55695/1 "2022-10-09T21:06:35Z")

</div>

I have an action for fallback. When some intents are triggered, they also trigger a fallback. So I get TWO messages returned. One from the correct action and one for the fallback action.

I have a number of rules since I want the user to be able to change between the intents a lot. But there are some dependencies on previous intents/actions setting up slots to be used later.

What can cause this behavior? I tried changing my stories. Have tried adding lots of stories with alternatives and tried having few stories and tried having no stories.

The same intent/action pair does a fallback action/correct action in some cases depending on the previous intent/action pair??

And a very similar intent/action works well in all cases!! I am really puzzled!!!

---

<div class="post-metadata">

**Author:** ![Adrielram](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/adrielram/32/21418_2.png) [@Adrielram](https://forum.rasa.com/u/Adrielram)\
**Post date:** [October 10, 2022, 12:37am UTC](https://forum.rasa.com/t/fallback-problem/55695/2 "2022-10-10T00:37:19Z")

</div>

Hi! could you show me your nlu, stories and rules, please?

---

<div class="post-metadata">

**Author:** ![MatsG](https://avatars.discourse-cdn.com/v4/letter/m/7993a0/32.png) [@MatsG](https://forum.rasa.com/u/MatsG)\
**Post date:** [October 10, 2022, 8:22am UTC](https://forum.rasa.com/t/fallback-problem/55695/3 "2022-10-10T08:22:51Z")

</div>

[nlu.yml](https://forum.rasa.com/uploads/short-url/kzy2ogiFXpBuxIXPWyI71dFIhbj.yml) (1.0 KB) [rules.yml](https://forum.rasa.com/uploads/short-url/5EYYkO3jfGqMbCI3fXzuFn8kcid.yml) (373 Bytes) [stories.yml](https://forum.rasa.com/uploads/short-url/piWaettHCYjODoPUl2RowRV8M7o.yml) (26 Bytes)

I edited down the nlu, rules and stories to these few and still the two actions are run, both action\_information and action\_default\_fallback, when I send one of the messages for action\_information, but not when I send the message for action\_history.

The slot setting in domain.yml is slots: place: type: text influence\_conversation: true mappings: - type: from\_entity entity: place I have tried setting influence\_conversation to false as well and the same thing happens

These are the config settings [config.yml](https://forum.rasa.com/uploads/short-url/4pPRfBn8OJVK4bnSOFfEJzWfAVr.yml) (2.4 KB)

I also tried create one story and tested that and no difference. [stories.yml](https://forum.rasa.com/uploads/short-url/cbnZRfspXpuBXl4nbOkh0jHymc2.yml) (205 Bytes)

## This is the output from rasa shell:

## Bot loaded. Type a message and press enter (use ‘/stop’ to exit): Your input → tell me about halmstad c:\users\public\rasa\venv\lib\site-packages\torch\amp\autocast\_mode.py:198: UserWarning: User provided device\_type of ‘cuda’, but CUDA is not available. Disabling warnings.warn(‘User provided device\_type of 'cuda', but CUDA is not available. Disabling’) _ **Normal** _ I have information about halmstad! Say information or history to listen! Your input → information _ **Normal** _ Halmstad (Swedish: [?h?lmsta(d)] (listen)) is a port, university, industrial and recreational city at the mouth of the Nissan river, in the province of Halland on the Swedish west coast. Halmstad is the seat of Halmstad Municipality and the capital of Halland County. _ **Normal** _ I did not understand ‘information’. Could you please rephrase it? Your input → history _ **Normal** _ Halmstad, at the time part of the Kingdom of Denmark, received its first city charter in 1307, and the city celebrated its 700th anniversary in 2007. The oldest remains of that first town are to be found at Övraby upstream on Nissan, just south of and quite close to the present day regiment buildings.

This is just a small subset from the nlu and rules. Everything else works fine and there are similar situations that works, i.e. asking for something and then having different options on the information extract. Is there a way to turn off action prediction which seems to be the reason for this.

When I run this with debug on, I get these messages:

…(extract)

Predicted next action ‘action\_information’ with confidence 1.00.

…

which is correct. And it sends the action and performs it well. But then it tries to predict next action and then it goes wrong.

------------------------------------------------------------(extract)

2022-10-10 10:08:59 DEBUG rasa.core.policies.rule\_policy - There is no applicable rule. 2022-10-10 10:08:59 DEBUG rasa.engine.graph - Node ‘select\_prediction’ running ‘DefaultPolicyPredictionEnsemble.combine\_predictions\_from\_kwargs’. 2022-10-10 10:08:59 DEBUG rasa.core.policies.ensemble - Predicted next action using RulePolicy. 2022-10-10 10:08:59 DEBUG rasa.core.processor - Predicted next action ‘action\_default\_fallback’ with confidence 0.30. 2022-10-10 10:08:59 DEBUG rasa.core.actions.action - Calling action endpoint to run action ‘action\_default\_fallback’.

…

Can I set any attribute to avoid this to happen? I just want it to listen again (action\_listen) I want Rasa to do fallbacks when it gets a message with low intent score, but these intents have a score of 0.99

Please help, sure it is something simple

Mats

---

<div class="post-metadata">

**Author:** ![MatsG](https://avatars.discourse-cdn.com/v4/letter/m/7993a0/32.png) [@MatsG](https://forum.rasa.com/u/MatsG)\
**Post date:** [October 11, 2022, 6:33am UTC](https://forum.rasa.com/t/fallback-problem/55695/4 "2022-10-11T06:33:54Z")

</div>

@Adrielram Did you see anything in my yml file that could cause my problem? Do you know of any way to turn off the prediction?

---

<div class="post-metadata">

**Author:** ![edu\_vives](https://avatars.discourse-cdn.com/v4/letter/e/7993a0/32.png) [@edu\_vives](https://forum.rasa.com/u/edu_vives)\
**Post date:** [October 11, 2022, 7:52am UTC](https://forum.rasa.com/t/fallback-problem/55695/5 "2022-10-11T07:52:21Z")

</div>

This error is usually caused when there are not enough stories for rasa to learn what action to perform next. I also ran into this problem, and apart from adding more stories, what really solved it was to **explicitly state in the rules that the bot should execute the action\_listen after the action in which it was receiving the fallback**. In my house I only had the fallback with a single action, so I only added it once. If it happens to you with many actions, this may not be the most elegant option, but it is functional.

![image](https://europe1.discourse-cdn.com/flex013/uploads/rasa/original/3X/e/7/e7d4847734ae248ce696aa3fa9dec03801cd8a8a.png)

**IMPORTANT!** Remember that if in the rules you indicate that the action\_listen must be executed after an action, you must also add it in all the stories that after this action an intent is executed, so that the action\_listen can be executed, this way the rule is not contradicted.

![image](https://europe1.discourse-cdn.com/flex013/uploads/rasa/original/3X/4/b/4bc52c46625d8b7cccc50f1604240df2c81a35e1.png)

Another possible solution would be to add stories in which **after the action that launches the Fallback, a user intent appears** , so that Rasa would learn that after that action it must wait for a response from the user.
