MultiProjectImporter and intents with the same name

Hi,

I am trying to understand how multi-project importer will handle intents with same name across multiple projects. Below are the two situations:

  • Import a project into another project where both the projects have intents with same. I assume it should merge it which seems to be the right behavior and not override it

  • In the second case, there is no imports, but multiple projects have intents with the same name. Again, I assume it should merge it when it rolls up for training and prediction.

This doubt came about because we have intent called “inform” in multiple domains/projects and would like to understand how rasa would handle. Appreciate any help.

Thanks, Juzer

Import a project into another project where both the projects have intents with same. I assume it should merge it which seems to be the right behavior and not override it

Yes, it’s currently merged.

In the second case, there is no imports, but multiple projects have intents with the same name.

I’m not sure I understand this case entirely. If there are no imports, it won’t import other data.

@Tobias_Wochinger: thanks for your response. The second case I was eluding to was around multiple projects that are totally disjoint i.e. no common imports, but these projects have same intent names for example chitchat. Since rasa trainer builds a single model, then how it is handled?

On a related topic, when I start the rasa interactive, I see the following message which I not able to make sense of: 2019-12-08 14:58:58 WARNING rasa.core.training.generator - There is no starting story block in the training data. All your story blocks start with some checkpoint. There should be at least one story block that starts without any checkpoint.

There is no use of checkpoints in my stories, but see this message only when using multi-project importer. Appreciate any help.

Thanks, Juzer.

i.e. no common imports, but these projects have same intent names for example chitchat. Since rasa trainer builds a single model, then how it is handled?

But you are still training them together right? Or would you train them separately? In the first case, you’d have to add imports which then would lead to merging all data.

I see the following message which I not able to make sense of: 2019-12-08 14:58:58 WARNING rasa.core.training.generator - There is no starting story block in the training data. All your story blocks start with some checkpoint.

I’d have to see your stories / project for that. My best guess is that this is a bug. Can you share a minimal example project to reproduce this? That would be awesome, thanks!

Hi @Tobias_Wochinger: below is the rasa version and necessary files to reproduce the warning message, thanks

rasa==1.3.9 rasa-sdk==1.3.3 rasa-x==0.21.4

config.yml:

Configuration for Rasa NLU.

Components

language: en #pipeline: pretrained_embeddings_spacy pipeline:

  • name: SpacyNLP
  • name: SpacyTokenizer
  • name: SpacyFeaturizer
  • name: RegexFeaturizer
  • name: CRFEntityExtractor
  • name: DucklingHTTPExtractor url: http://localhost:8000 dimensions: [“time”, “amount-of-money”]
  • name: EntitySynonymMapper
  • name: SklearnIntentClassifier

Configuration for Rasa Core.

Policies

policies:

  • name: MemoizationPolicy max_history: 3
  • name: KerasPolicy featurizer:
    • name: MaxHistoryTrackerFeaturizer max_history: 5 state_featurizer:
      • name: BinarySingleStateFeaturizer
  • name: TwoStageFallbackPolicy nlu_threshold: 0.4 core_threshold: 0.4 ambiguity_threshold: 0.1 fallback_nlu_action_name: “action_default_fallback” fallback_core_action_name: “action_default_ask_affirmation” deny_suggestion_intent_name: “out_of_scope”
  • name: FormPolicy
  • name: MappingPolicy

importers:

  • name: MultiProjectImporter

imports:

  • projects/common

projects/common/domain.yml:

%YAML 1.1

intents:

  • affirm
  • chitchat
  • deny
  • goodbye
  • greetings
  • out_of_scope
  • rollback
  • foo_help
  • bar_help
  • stop
  • thanks
  • ask_builder
  • ask_weather
  • ask_howdoing
  • ask_whatspossible
  • ask_isbot
  • ask_howold
  • ask_languagesbot
  • ask_restaurant
  • ask_time
  • ask_wherefrom
  • ask_whoami
  • handleinsult
  • nicetomeeyou
  • telljoke
  • ask_whatismyname
  • ask_howbuilt
  • ask_whoisit
  • ask_whatisnvoice

actions:

  • action_greet_user
  • action_reset_slots
  • action_default_ask_affirmation
  • action_default_fallback
  • action_chitchat
  • utter_ask_why_leaving
  • utter_describe_foo
  • utter_describe_bar
  • utter_goodbye
  • utter_greet
  • utter_nvoice_help
  • utter_start
  • utter_thanks
  • utter_ask_continue
  • utter_default,
  • utter_help_message
  • utter_no_results
  • utter_noworries
  • utter_submit
  • utter_chitchat
  • utter_ask_builder
  • utter_ask_weather
  • utter_ask_howdoing
  • utter_ask_whatspossible
  • utter_ask_isbot
  • utter_ask_howold
  • utter_ask_languagesbot
  • utter_ask_restaurant
  • utter_ask_time
  • utter_ask_wherefrom
  • utter_ask_whoami
  • utter_handleinsult
  • utter_nicetomeeyou
  • utter_telljoke
  • utter_ask_whatismyname
  • utter_ask_howbuilt
  • utter_ask_whoisit
  • utter_ask_to_complete_form
  • utter_ask_whatisnvoice
  • utter_nohelp

slots: form_name: type: unfeaturized

templates: utter_ask_continue:

  • text: do you want to continue? utter_ask_why_leaving:
  • text: Do you need some more time? utter_default:
  • text: Don’t understand your request, please try again utter_goodbye:
  • text: Talk to you later! utter_greet:
  • text: Hi, there! utter_help_message:
  • text: don’t understand your request, I can only understand request related to accounts, contacts and opportunities utter_no_results:
  • text: Sorry, I couldn’t find anything utter_noworries:
  • text: you are welcome :slight_smile: utter_nvoice_help:
  • text: Currently I have limited skills in foo and bar. Do you want to find out more about me? utter_start:
  • text: sure, let’s get started utter_submit:
  • text: all done! utter_thanks:
  • text: you are very welcome utter_describe_foo:
  • text: For foo, I can lookup contact information and create oportunity utter_describe_bar:
  • text: For bar, I can create incident and lookup it up by severity, oldest etc. utter_chitchat:
  • text: do you want to get back to creating opportunity? utter_ask_builder:
  • text: "The engineers at xxxxx :hammer_and_wrench: "
  • text: “One of the smart engineers at xxxxx! :brain:” utter_ask_weather:
  • text: “I don’t know about where you live, but in my world it’s always sunny :sunny:
  • text: “Honestly it’s a bit too hot these days :sweat_smile:
  • text: “Blue skies and sunshine!”
  • text: “Let’s just say it hasn’t rained in weeks :sunny:” utter_ask_howdoing:
  • text: “I’m great! Thanks for asking.”
  • text: “I’m good, thanks!” utter_ask_whatspossible:
  • text: “You can book a sales call or subscribe to our newsletter.” utter_ask_isbot:
  • text: “Yep, I’m a bot!” utter_ask_howold:
  • text: “42.”
  • text: “Old enough to be a bot.”
  • text: “Age is just an issue of mind over matter. If you don’t mind, it doesn’t matter.” utter_ask_languagesbot:
  • text: “I can spell baguette in French, but unfortunately English is the only language I can answer you in.”
  • text: “I am in the process of learning, but at the moment I can only speak English.” utter_ask_restaurant:
  • text: “I’m sorry, I can’t recommend you a restaurant as I usually cook at home.” utter_ask_time:
  • text: “It’s the most wonderful time of the year!” utter_ask_wherefrom:
  • text: “I was born in Berlin, but I consider myself a citizen of the world.”
  • text: “I was born in the coolest city on Earth.” utter_ask_whoami:
  • text: “I hope you are being yourself.” utter_handleinsult:
  • text: “That’s not very nice :cry:” utter_nicetomeeyou:
  • text: “Thank you. It is a pleasure to meet you as well!”
  • text: “It is nice to meet you too!”
  • text: “Pleased to meet you too!”
  • text: “Likewise!” utter_telljoke:
  • text: “Why are eggs not very much into jokes? - Because they could crack up.”
  • text: “Do you know a tree’s favorite drink? - Root beer!”
  • text: “Why do the French like to eat snails so much? - They can’t stand fast food.” utter_ask_whatismyname:
  • text: “It’s probably the one that your parents chose for you.” utter_ask_howbuilt:
  • text: “I was built with a lot of love and patience.” utter_ask_whoisit:
  • text: “I’m the xxxxx bot! :robot:” utter_ask_to_complete_form:
  • text: “Do you want to get to completing {form_name}?” utter_ask_whatisnvoice:
  • text: “Nueva Voice is a platform for integration with SaaS apps! You can read more about it here in the docs or on our website (https://www.nvoice.ai/docs).” utter_nohelp:
  • text: “For now that’s all I can do, so feel free to try it out. If you have any suggestions for what I should learn, let me know!”

projects/common/data/nlu_data.md:

intent: greetings

  • Hi
  • Hey
  • Hi bot

intent: thanks

  • thanks
  • thank you
  • Thanks a lot
  • Thanks a bunch

intent: foo_help

  • foo
  • describe your foo skills
  • what can you do in foo
  • tell me what you can do in foo

intent: bar_help

  • bar
  • describe your bar skills
  • what can you do in bar

intent: goodbye

  • um thank you good bye
  • okay cool uh good bye thank you
  • okay thank you good bye

intent:deny

  • no
  • no, let’s try again
  • uh no
  • uh no, let’s try again

intent:affirm

  • yeah
  • correct
  • ye
  • uh yes
  • let’s do it
  • yeah

intent:chitchat

  • can you share your boss with me?
  • i want to get to know your owner
  • i want to know the company which designed you
  • i want to know the company which generated you

intent:out_of_scope

  • I want pizza
  • please help with my ice cream it’s dripping
  • no wait go back i want a dripping ice cream but a cone that catches it so you can drink the ice cream later
  • i want a non dripping ice cream
  • hey little mama let em whisper in your ear

intent:stop

  • ok then you cant help me
  • that was shit, you’re not helping
  • you can’t help me
  • you can’t help me with what i need

intent:rollback

  • redo the previous input
  • rollback the last input
  • delete the previous input

intent:ask_builder

  • can you share your boss with me?
  • i want to get to know your owner
  • i want to know the company which designed you
  • i want to know the company which generated you
  • i want to know the company which invented you
  • i want to know who invented you

intent:ask_weather

  • How is the weather today?
  • What’s the weather like?
  • How is the weather?
  • What is the weather at your place?
  • Do you have good weather?
  • Is it raining?

intent:ask_howdoing

  • Ahoy matey how are you?
  • are you alright
  • are you having a good day
  • Are you ok?
  • are you okay

intent:ask_whatspossible

  • help
  • help please
  • i don’t know what i want
  • I need some help
  • options
  • show me the menu

intent:ask_whoisit

  • who is this
  • who am i talking to
  • what’s your name
  • who am i speaking with
  • who r u

intent:ask_isbot

  • are you a bot?
  • are you a real bot?
  • are you a bot
  • are you really a bot

intent:ask_languagesbot

  • Which languages do you speak?
  • What are the languages you can speak?
  • In which languages can you speak?
  • What languages do you know?

intent:ask_restaurant

  • restaurants
  • can i be shown a gluten free restaurant
  • i want a french restaurant
  • i’m looking for a Chinese restaurant
  • I need a new restaurant

intent:ask_time

  • what is the current time?
  • what is the time in Sydney?
  • whats the time now
  • what is the time ?

intent:ask_whatismyname

  • what is my name?
  • May i know my name?
  • What is my name?

intent:ask_wherefrom

  • where do you live
  • where are you from?
  • So where are you from
  • Where are you?

intent:ask_whoami

  • Who am I?
  • Okay who am I?
  • WHo am I
  • Tell me who am I?
  • Tell me who I am?

intent:ask_howbuilt

  • How were you built?
  • How were you made?
  • I’d like to know how you were created

intent:ask_whatisnvoice

  • How does Rasa work?
  • Can you tell me more about rasa?
  • What does Rasa build?
  • What do you do at Rasa?

projects/common/data/stories.md:

greetings

  • greetings
    • utter_greet

thanks

  • thanks
    • utter_thanks

goodbye

  • goodbye
    • utter_goodbye

greet_followed_by_goodbye

  • greetings
    • utter_greet
  • goodbye
    • utter_ask_why_leaving

help_01

  • ask_whatspossible
    • utter_nvoice_help
  • affirm
    • utter_describe_foo
    • utter_describe_bar

help_02

  • ask_whatspossible
    • utter_nvoice_help
  • foo_help
    • utter_describe_foo

help_03

  • ask_whatspossible
    • utter_nvoice_help
  • bar_help
    • utter_describe_bar

help_04

  • ask_whatspossible
    • utter_nvoice_help
  • deny
    • utter_start

chitchat

  • ask_weather OR ask_builder OR ask_howdoing OR ask_whoisit OR ask_whatisnvoice OR ask_isbot OR ask_howold OR ask_languagesbot OR ask_restaurant OR ask_time OR ask_wherefrom OR ask_whoami OR handleinsult OR nicetomeeyou OR telljoke OR ask_whatismyname OR ask_howbuilt
    • action_chitchat

more chitchat

  • ask_weather OR ask_builder OR ask_howdoing OR ask_whoisit OR ask_whatisnvoice OR ask_isbot OR ask_howold OR ask_languagesbot OR ask_restaurant OR ask_time OR ask_wherefrom OR ask_whoami OR handleinsult OR nicetomeeyou OR telljoke OR ask_whatismyname OR ask_howbuilt
    • action_chitchat
  • ask_weather OR ask_builder OR ask_howdoing OR ask_whoisit OR ask_whatisnvoice OR ask_isbot OR ask_howold OR ask_languagesbot OR ask_restaurant OR ask_time OR ask_wherefrom OR ask_whoami OR handleinsult OR nicetomeeyou OR telljoke OR ask_whatismyname OR ask_howbuilt
    • action_chitchat

@jkothamb Can you please break down the example to a minimal one (only as much as is needed to reproduce the problem)? That would it make easier to grasp your setup and debug it. Thanks :pray:

Hi @Tobias_Wochinger: here is shorter version of the same and issue reproducible, thanks:

config.yml:

Configuration for Rasa NLU.

Components

language: en #pipeline: pretrained_embeddings_spacy pipeline:

  • name: SpacyNLP
  • name: SpacyTokenizer
  • name: SpacyFeaturizer
  • name: RegexFeaturizer
  • name: CRFEntityExtractor
  • name: DucklingHTTPExtractor url: http://localhost:8000 dimensions: [“time”, “amount-of-money”]
  • name: EntitySynonymMapper
  • name: SklearnIntentClassifier

Configuration for Rasa Core.

Policies

policies:

  • name: MemoizationPolicy max_history: 3
  • name: KerasPolicy featurizer:
    • name: MaxHistoryTrackerFeaturizer max_history: 5 state_featurizer:
      • name: BinarySingleStateFeaturizer
  • name: TwoStageFallbackPolicy nlu_threshold: 0.4 core_threshold: 0.4 ambiguity_threshold: 0.1 fallback_nlu_action_name: “action_default_fallback” fallback_core_action_name: “action_default_ask_affirmation” deny_suggestion_intent_name: “out_of_scope”
  • name: FormPolicy
  • name: MappingPolicy

importers:

  • name: MultiProjectImporter

imports:

  • projects/common

projects/common/domain.yml:

%YAML 1.1

intents:

  • greetings
  • thanks
  • foo_help
  • bar_help
  • goodbye
  • chitchat
  • out_of_scope
  • ask_builder
  • ask_weather
  • ask_howdoing
  • ask_whatspossible
  • ask_whoisit
  • affirm

actions:

  • action_greet_user

  • action_reset_slots

  • action_default_ask_affirmation

  • action_default_fallback

  • action_chitchat

  • utter_ask_why_leaving

  • utter_describe_bar

  • utter_describe_foo

  • utter_goodbye

  • utter_greet

  • utter_nvoice_help

  • utter_thanks

slots: form_name: type: unfeaturized

templates: utter_ask_why_leaving:

  • text: Do you need some more time? utter_goodbye:
  • text: Talk to you later! utter_greet:
  • text: Hi, there! utter_nvoice_help:
  • text: Currently I have limited skills in foo and bar. Do you want to find out more about me? utter_thanks:
  • text: you are very welcome utter_describe_foo:
  • text: For foo, I can lookup contact information and create oportunity utter_describe_bar:
  • text: For bar, I can create incident and lookup it up by severity, oldest etc.

projects/common/data/nlu_data.md:

intent: greetings

  • Hi
  • Hey
  • Hi bot

intent: thanks

  • thanks
  • thank you
  • Thanks a lot
  • Thanks a bunch

intent: foo_help

  • describe your foo skills
  • what can you do in saleforce
  • tell me what you can do in foo

intent: bar_help

  • bar
  • describe your bar skills
  • what can you do in bar

intent: goodbye

  • um thank you good bye
  • okay cool uh good bye thank you

intent:chitchat

  • can you share your boss with me?
  • i want to get to know your owner

intent:out_of_scope

  • I want pizza
  • please help with my ice cream it’s dripping

intent:ask_builder

  • can you share your boss with me?
  • i want to get to know your owner

intent:ask_weather

  • How is the weather today?
  • What’s the weather like?

intent:ask_howdoing

  • Ahoy matey how are you?
  • are you alright
  • are you okay

intent:ask_whatspossible

  • help please
  • i don’t know what i want

intent:ask_whoisit

  • who is this
  • who am i talking to

intent:affirm

  • yeah
  • correct
  • ye
  • uh yes

projects/common/data/stories.md:

greetings

  • greetings
    • utter_greet

thanks

  • thanks
    • utter_thanks

goodbye

  • goodbye
    • utter_goodbye

greet_followed_by_goodbye

  • greetings
    • utter_greet
  • goodbye
    • utter_ask_why_leaving

help_01

  • ask_whatspossible
    • utter_nvoice_help
  • affirm
    • utter_describe_foo
    • utter_describe_bar

help_02

  • ask_whatspossible
    • utter_nvoice_help
  • foo_help
    • utter_describe_foo

help_03

  • ask_whatspossible
    • utter_nvoice_help
  • bar_help
    • utter_describe_bar

help_04

  • ask_whatspossible
    • utter_nvoice_help

chitchat

  • ask_weather OR ask_builder OR ask_howdoing OR ask_whoisit
    • action_chitchat

more chitchat

  • ask_weather OR ask_builder OR ask_howdoing OR ask_whoisit
    • action_chitchat
  • ask_weather OR ask_builder OR ask_howdoing OR ask_whoisit
    • action_chitchat

Hi @Tobias_Wochinger: wondering if you got a chance to look at this, thanks

Hi @Tobias_Wochinger: hope the off-site went well. Did you get a chance to look into this, thanks

@jkothamb Can you just put it in a zip or format it in code tags please? Otherwise I have to add all - manually for every example :see_no_evil:

@Tobias_Wochinger: attach please find the complete project, thanks

rasa-iss1.tgz (122.2 KB)

Hi @Tobias_Wochinger: did you get a chance to look into it? thanks.