When Rasa 1.0 came out, our team had just started using it to create our first chatbot. Today, around 18 months later, we have yet to find a clean way of avoiding big merge conflicts inside our data files. For example, when re-ordering stories or when moving phrases from one intent to another, we always have to face a lot of merge conflicts when merging to master.
To an extent, this is natural, as we know that the merges are based on the diffs and git’s
diff is not aware of the semantics of the
md) files. For example, after removing a story and adding another - a pretty simple change -
git diff gives us a very confusing result:
6c6,7 < - story: unhappy Whats_your_name, Pharma_search, Am_I_Ill (interactive) --- > > - story: unhappy Covid_Stats, Am_I_Ill 8,19c9,12 < - intent: Greetings < - action: action_utter_greetings < - action: utter_use < - intent: Whats_your_name < - action: utter_name < - action: utter_fuse < - intent: Pharma_search < - action: pharmacy_form < - active_loop: pharmacy_form < - slot_was_set: < - requested_slot: requested_city < - intent: Am_I_Ill --- > - intent: Covid_Stats > - action: covid_statistics_form > - active_loop: covid_statistics_form > - intent: What_to_do_if_positive 24,49c17 < - action: ill_questionnaire_form < - active_loop: ill_questionnaire_form < - slot_was_set: < - requested_slot: has_cough < - slot_was_set: < - has_cough: true < - slot_was_set: < - requested_slot: has_fever < - slot_was_set: < - has_fever: false < - slot_was_set: < - requested_slot: has_SOBreath < - slot_was_set: < - has_SOBreath: false < - slot_was_set: < - requested_slot: has_Anosia < - slot_was_set: < - has_Anosia: true < - slot_was_set: < - requested_slot: has_Ageusia < - slot_was_set: < - has_Ageusia: false < - slot_was_set: < - requested_slot: null < - active_loop: null < - action: ill_questionnaire_form_submit --- > - action: utter_what_to_do_if_positive
My question is how do you handle merge conflicts in such files? Has anybody implemented a merge algorithm that takes into account the semantics of stories and intents? The only related thing I have found is Unity’s smart merge for yml files but I haven’t tried it out yet.