Reminders with Rasa CALM not trigeering the correct intent

I have a functionaity for reminders. I ahve configured as per documentation.But I see warning as (venv) geetadesai@MacBook-Pro rasa-calm % rasa data validate 2024-03-10 04:02:04 INFO rasa_plus.telemetry - Initialised global config file with Rasa Pro telemetry tracking set to True. 2024-03-10 04:02:06 INFO rasa.validator - Validating intents… /Users/geetadesai/rasa-calm/venv/lib/python3.10/site-packages/rasa/shared/utils/io.py:99: UserWarning: The intent ‘EXTERNAL_reminder_callback’ is not used in any story, rule or flow. Though my domain.yml has that entry responses: utter_time_for_medication: - text: “It’s time for your medication.” rules:

  • rule: Schedule medication reminder steps:
    • intent: schedule_medication
    • action: action_schedule_medication_reminder
  • rule: reminder callback steps: - intent: EXTERNAL_reminder_callback - action: action_notify_medication Git URL GitHub - geeta-m-desai/rasa-calm at new-branch2 Could you pelase provide some hints on this, I am stuck on this for 2 days.

(venv) geetadesai@MacBook-Pro rasa-calm % rasa --version Rasa Version : 3.7.8 Minimum Compatible Version: 3.7.0 Rasa SDK Version : 3.7.1 Python Version : 3.10.10 Operating System : macOS-14.3.1-x86_64-i386-64bit Python Path : /Users/geetadesai/rasa-calm/venv/bin/python3 Rasa Plus Version : 3.7.8

It always triggers intentlessPOlicy Your input → reminders 2024-03-10 04:48:11 INFO rasa.utils.log_utils - [info ] llm_command_generator.predict_commands.finished commands=[StartFlowCommand(flow=‘schedule_reminders’)] I will remind you in 5 seconds. What more can I assist you with? Your input → 2024-03-10 04:49:12 INFO rasa_plus.ml.intentless_policy - [info ] intentless_policy.prediction.completed predicted_action_name=utter_boolean_slot_rejection score=0.6538142578480671

Action server logs reminder ===> {‘event’: ‘reminder’, ‘timestamp’: None, ‘intent’: ‘EXTERNAL_reminder_callback’, ‘entities’: , ‘date_time’: ‘2024-03-10T04:49:11.686317’, ‘name’: ‘my_reminder’, ‘kill_on_user_msg’: False} 2024-03-10 04:48:11 DEBUG rasa_sdk.executor - Finished running ‘action_schedule_medication_reminder’

Thanks, Geeta

Hi Geeta, Reminders feature was initially designed to work with NLU Based assistants – there may be some issues while trying this with CALM assistants. I see that in your logs a flow schedule_reminders and the action_notify_medication run properly. Is the only issue the visible warning?

Instead of using a rule (which do not work in CALM assistants), you can add an intent trigger to your flows.

Thanks for repsondng. No issue is not only with warning. My External_Revert reminder intent is never recognized . See below for logs 2024-04-02 18:16:46 DEBUG rasa_sdk.executor - Received request to run ‘action_schedule_medication_reminder’ reminder ===> {‘event’: ‘reminder’, ‘timestamp’: 1712062006.452625, ‘intent’: ‘EXTERNAL_revert’, ‘entities’: None, ‘date_time’: ‘2024-04-02T18:16:56.452605+05:30’, ‘name’: ‘medication_reminder’, ‘kill_on_user_msg’: False} 2024-04-02 18:16:46 DEBUG rasa_sdk.executor - Finished running ‘action_schedule_medication_reminder’

Conversation: USER: reminder AI: I will remind you in 5 seconds. AI: Is there anything else you need assistance with? USER: EXTERNAL: EXTERNAL_revert

Summary: summarization=The user requested a reminder from the AI, which was set for 5 seconds. The AI then asked if there was anything else the user needed assistance with. 2024-04-02 18:17:01 DEBUG rasa_plus.ml.contextual_response_rephraser - [debug ] nlg.rephrase.prompt prompt=The following is a conversation with

I have use DIETCLASSIFIER and NLUCommandAdapter,LLMCommandGenerator

  • name: CountVectorsFeaturizer analyzer: “char_wb” min_ngram: 1 max_ngram: 4
  • name: DIETClassifier # Adds embeddings epochs: 100 constrain_similarities: true
  • name: EntitySynonymMapper
  • name: NLUCommandAdapter mappings: “./nlu_command_mappings.yml”
  • name: LLMCommandGenerator llm: model_name: gpt-4 request_timeout: 7 max_tokens: 256

policies:

  • name: FlowPolicy confidence_threshold: 0.7
  • name: rasa_plus.ml.IntentlessPolicy number_of_samples: 5 nlu_abstention_threshold: 0.2 assistant_id: 20240223-114328-mitram-cares

And set up prooer flows schedule_reminders: nlu_trigger: - intent: schedule_medication confidence_threshold: 0.2 # optional name: schedule_medication description: reminder steps: - action: action_schedule_medication_reminder EXTERNAL_revert: nlu_trigger: - intent: EXTERNAL_revert confidence_threshold: 0.2 # optional name: EXTERNAL_revert description: EXTERNAL_revert steps: - action: action_notify_medication As earlier John had relied back saying with CALM reminders was never designed and we need to use nlu.

Infact I have tried multiple things on this in alst few days , I could not get it working. Any help is highly appreciated.

I haven’t noticed the other thread, my apologies! What John has said is true, reminders were never designed to work with CALM. For now the old NLU style is the way to go, we will update you if there is a better way to use reminders :slight_smile:

Can you please ellaborate more on using NLU style. I used nlu_triggers for the same and is not working.

schedule_reminders: nlu_trigger: - intent: schedule_medication confidence_threshold: 0.2 # optional name: schedule_medication description: reminder steps: - action: action_schedule_medication_reminder EXTERNAL_revert: nlu_trigger: - intent: EXTERNAL_revert confidence_threshold: 0.2 # optional name: EXTERNAL_revert description: EXTERNAL_revert steps: - action: action_notify_medication

I solved this problem by invoking callback channel with reminder event programtiaclly from custom action i.e my action of schedule_reminders. Can this approach bring any challanges later?

Glad to hear you got it working! Your method of programmatically invoking a callback channel with a reminder event through a custom action like schedule_reminders is quite intriguing. Did you develop this using flows or rules? While your approach seems efficient, it’s valuable to consider any potential challenges, particularly in terms of error handling and scalability for the custom action. It would be incredibly helpful for the community if you could share more details about your implementation. Maybe, would you be willing to share the code? This could allow others to learn from your approach and possibly suggest enhancements or alternatives.

Sure. Let me solve the last puzzle of sending that reminder response on socket channel, I will provide code over here.

It was not possible to send the reminder message on socket channel with callback handler , faced many issues Hence I took traditional approach of saving reminders in db and a scheduler to send reminders