I understand that the best way to handle context switching is to make “stories” for “un-happy paths” like so:
HAPPY PATH:
intent_A
utter_first response_to_A
answer_for_A
action_final_action_for_A
UNHAPPY PATH:
intent_A
utter_first_response_to_A
intent_B
utter_first_response_for_B
answer_for_B
action_final_action_for_B
utter_would_you_like_to_return_to_B
The issue is that we have 50+ intents (some of them with very involved dialogue flows alone) and to create stories to cover all (or enough paths) to meet regulatory demands that the stories proceed as they should we would require an exponential number of stories.
Is there any other way this can be handled? I had thought of storing the state of the tracker in some kind of stack when a context switch is made that one could pop off as context switches are finished and return to the previous flow. However, I am at a loss to determine when there is in fact a context switch.
do all of your 50+ user goals require multi-turn interactions? If so you have a very complicated project! If many of these can be handled with a single-turn response, I would highly recommend trying retrieval actions which let you model all the single-turn interactions with a single intent.
the new transformer-based embedding policy is designed to do exactly this. The paper also describes why we don’t use a stack [1910.00486] Dialogue Transformers
Sorry, but I’m not sure what you mean by “hard-coded dialogue manager”. Do you mean many if-then-else/switch statements or a state machine or a discourse tree or something else? Thanks!
I was not a part of the team that coded the dialogue manager and I have moved onto another project at this point (mercifully TBH, I did not agree with the solution). I believe it was if/else/then but I am not certain.
@v5out not many if-then statements. We have devised some rules for the handling the conversation gracefully. like if a form action for order food has been triggered and in between filling this form, user changes its mind and wants to book a flight, we show him a yes-no button to the user that asks if he really wants to end the current inquiry? if he says yes then it means he don’t want to proceed with the order, at this point we end the form. while if he start asking FAQs during order food we allow him for two times but for the 3rd time we ask him if he wants to continue with the order food or not? if he says yes we put the user back to the form otherwise exit the form. and to handle all of this we are using mapping policy