I have a bot that has multiple topical tracks for a user to experience. Each track is independent of each other. When the user wants to leave one track for another, I want the bot to remember where it stopped and be able to resume from that point, should the user come back.
Using slots and custom actions, I have managed to store the last bot utterance on the current track when the user switches to a new track. This last bot utterance is then retrieved when the user comes back to the track.
I can get the bot to display the correct utterance. However, I am having issues getting the bot to recognize which part of the story it should continue from.
My stories look something like this:
story: Track 1
- intent: start_track_1 - action: utter_track_1_1 - intent: affirm - action: utter_track_1_2 - intent: affirm - action: utter_track_1_3 - intent: affirm
story: Track 2
- intent: start_track_2 - action: utter_track_2_1 - intent: affirm - action: utter_track_2_2 - intent: affirm - action: utter_track_2_3 - intent: affirm
So for example, if the user is in the middle of track 1, at utter_track_1_2, and leaves to start track 2 instead. I will store utter_track_1_2 in a slot, start on track 2. In the middle of track 2, when the user leaves to resume track_1, I will check the slot and display the stored utterance (utter_track_1_2 in this case). The user can then select to continue using the affirm intent.
The issue comes about after the user uses the affirm intent and the next bot utterance comes from an entirely different location (e.g. utter_track_1_47 instead).
It seems that maybe using a generic intent (affirm) is throwing the bot off, as well as having it start in the middle of a story. I’ve been trying various combinations of Augmentation as well as max_history in the config.yml but haven’t been able to pin down something that works.
Sample policy section of config.yml: ’ policies:
- name: AugmentedMemoizationPolicy max_history: 3
- name: RulePolicy check_for_contradictions: true
- name: TEDPolicy epochs: 100 max_history: 3 ’ I hope someone will be able to shed some light on this.
I’m using RASA open source 2.2.10.