Chitchat cannot be handled

Hi. I’m trying to enable chitchat in my Rasa Pro CALM bot. I did exactly what is written here: Chitchat and Small Talk , but after any chitchat message, I get the default “cannot handle” message as a response.

I have

  • fully functioning Rasa CALM where everything else works well
  • Intentess policy set up in config.yml
  • rephrase turned on in endpoints.yml
  • working OpenAI key in the env

In the logs I see the Chitchat() command is correctly predicted, but a bit later “cannot_handle” pattern is triggered with reason “cannot_handle_chitchat”. Here is what I think is the relevant part of the logs:

2025-02-13 14:10:00 DEBUG    rasa.shared.providers._ssl_verification_utils  - [debug    ] ensure_ssl_certificates_for_litellm_non_openai_based_clients ssl_certificate=None ssl_verify=None
2025-02-13 14:10:00 DEBUG    rasa.shared.providers._ssl_verification_utils  - [debug    ] ensure_ssl_certificates_for_litellm_openai_based_clients ssl_certificate=None ssl_verify=None
2025-02-13 14:10:00 DEBUG    rasa.shared.providers.llm._base_litellm_client  - [debug    ] base_litellm_client.formatted_response formatted_response={'id': 'chatcmpl-B0SktHKKj9ujsDzIK1AXhZg0nTzLA', 'choices': ['ChitChat()'], 'created': 1739450235, 'model': 'gpt-4-0613', 'usage': {'prompt_tokens': 730, 'completion_tokens': 5, 'total_tokens': 735}, 'additional_info': None}
2025-02-13 14:10:00 DEBUG    rasa.utils.log_utils  - [debug    ] llm_command_generator.predict_commands.actions_generated action_list=ChitChat()
C:\Users\PetrG\AppData\Local\miniconda3\envs\Chatbot-assistant\lib\site-packages\pydantic\main.py:314: UserWarning: Pydantic serializer warnings:
  Expected `CompletionTokensDetails` but got `dict` - serialized value may not be as expected
  return self.__pydantic_serializer__.to_python(
2025-02-13 14:10:00 DEBUG    rasa.utils.log_utils  - [debug    ] llm_command_generator.predict_commands.finished commands=[ChitChatAnswerCommand()]
2025-02-13 14:10:00 DEBUG    rasa.engine.graph  - [debug    ] graph.node.running_component   clazz=RegexMessageHandler fn=process node_name=run_RegexMessageHandler
2025-02-13 14:10:00 DEBUG    rasa.core.processor  - [debug    ] processor.message.parse        parse_data_entities=[] parse_data_intent={'name': None, 'confidence': 0.0} parse_data_text=how are you?
2025-02-13 14:10:00 DEBUG    rasa.core.processor  - Logged UserUtterance - tracker now has 4 events.
2025-02-13 14:10:00 DEBUG    rasa.engine.runner.dask  - Running graph with inputs: {'__tracker__': DialogueStateTracker(sender_id: a4870e22aff94850840a49e6947c7018)}, targets: ['command_processor'] and ExecutionContext(model_id='f4e31ef37a464f6b83d396a9ec864be2', should_add_diagnostic_data=False, is_finetuning=False, node_name=None).
2025-02-13 14:10:00 DEBUG    rasa.engine.graph  - [debug    ] graph.node.running_component   clazz=FlowsProvider fn=provide_inference node_name=flows_provider
2025-02-13 14:10:00 DEBUG    rasa.engine.graph  - [debug    ] graph.node.running_component   clazz=StoryGraphProvider fn=provide_inference node_name=story_graph_provider
2025-02-13 14:10:00 DEBUG    rasa.engine.graph  - [debug    ] graph.node.running_component   clazz=CommandProcessorComponent fn=execute_commands node_name=command_processor
2025-02-13 14:10:00 WARNING  rasa.dialogue_understanding.processor.command_processor  - [warning  ] command_processor.clean_up_chitchat_command.replace_chitchat_answer_with_cannot_handle command=CannotHandleCommand(reason='cannot_handle_chitchat') defined_intentless_policy_in_config=True pattern_chitchat_uses_action_trigger_chitchat=True
2025-02-13 14:10:00 DEBUG    rasa.dialogue_understanding.processor.command_processor  - [debug    ] command_processor.clean_up_commands.final_commands command=[CannotHandleCommand(reason='cannot_handle_chitchat')]
2025-02-13 14:10:00 DEBUG    rasa.engine.runner.dask  - Running graph with inputs: {'__tracker__': DialogueStateTracker(sender_id: a4870e22aff94850840a49e6947c7018), '__endpoints__': <rasa.core.utils.AvailableEndpoints object at 0x000002097B10CE50>}, targets: ['select_prediction'] and ExecutionContext(model_id='f4e31ef37a464f6b83d396a9ec864be2', should_add_diagnostic_data=False, is_finetuning=False, node_name=None).

No idea what’s wrong and how to make it work…

Thanks much for any help.

2 Likes

According to info here - Conversation Repair :

** The pattern pattern_cannot_handle has the context attribute reason. reason is set to:

  • cannot_handle_chitchat, when pattern_chitchat attempts to invoke action_trigger_chitchat without an IntentlessPolicy defined.**

But I have IntentlessPolicy in my config.yml and the logs from rasa train suggest it is correctly trained:

2025-02-13 14:54:06 INFO     rasa.engine.training.hooks  - Starting to train component 'IntentlessPolicy'.
2025-02-13 14:54:07 INFO     rasa.core.policies.intentless_policy  - [info     ] intentless_policy.training.completed
2025-02-13 14:54:08 INFO     rasa.engine.training.hooks  - Finished training component 'IntentlessPolicy'.
2 Likes

Commenting to share that I am facing the exact same issue after following the documentation. Have you found a solution yet or is this still an issue?

I am limited to using Rasa 3.10 but would good to know if it’s also an issue with later versions.

2025-02-19 15:13:55 WARNING  rasa.dialogue_understanding.processor.command_processor  - [warning  ] command_processor.clean_up_chitchat_command.replace_chitchat_answer_with_cannot_
handle command=CannotHandleCommand(reason='cannot_handle_chitchat') defined_intentless_policy_in_config=True pattern_chitchat_uses_action_trigger_chitchat=True
1 Like

Nope. I tried everything that I thought might be relevant - no success. Also couldn’t find any relevant info on this anywhere else. I’m on Rasa 3.10.7.

Currently I have a workaround, where I use a “chitchat” flow instead - this handles at least the most frequent cases of user chitchat messages in a simple manner.

Would be grateful if you let me know in case you solve this.

1 Like

@Arjaan can you please advise when we can expect support on this issue? This thread is now a week old and following the official Rasa documentation has been insufficient.

2 Likes

Do you found how to fix it ? :grimacing:

Nope. Could please someone from Rasa comment on this? I’m clearly not the only one having this problem and the documentation is not sufficient on this.

@PetrG I tried tagging the person who wrote the pinned post saying Rasa devs monitor these threads daily. I suggest tagging others if you know any