Fallback problem

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!!!

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

nlu.yml (1.0 KB) rules.yml (373 Bytes) stories.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 (2.4 KB)

I also tried create one story and tested that and no difference. stories.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

@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?

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

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

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.