Storage of multiple intents


(Nicole Pilsworth) #1

Hi, I am currently using the Rasa Stack to code a chatbot, and I was hoping to get some help on the use of multiple intents in stories.

I am using the tensorflow embedding pipeline to achieve this, and I’ve checked that the multiple intents story I’ve written is definitely being used. However, in my custom action when I try to retrieve my intent, it only contains one of those intents. I was wondering if I am missing the way to retrieve both intents from the story that has been followed?

For example, this is how my config pipeline is set up:

pipeline:
- name: "nlp_spacy"
- name: "ner_spacy"
- name: "intent_featurizer_count_vectors"
- name: "intent_classifier_tensorflow_embedding"
  intent_tokenization_flag: true
  intent_split_symbol: "+"

I have a story like this in stories.md:

## x and y
* x+y
    - custom_action

I have also removed any stories with only x or only y in, to ensure this story is followed. In my custom action I have the following code:

intent = tracker.latest_message.intent["name"]

which contains only y.

Thanks in advance for your help.


(Nicole Pilsworth) #2

Hi,

I ended up fixing this because I didn’t realise it was necessary to include NLU training data in nlu.md for x, y and x+y. Once I added training data for x+y by combining NLU data for x and y, the intent “x+y” was stored in the tracker.


(Juste) #3

Hey @nicole. Glad you found the solution to your problem :slight_smile: