How do I add multiple intents?

I have this set of data in the data.json file.

{
  "rasa_nlu_data": {
    "common_examples": [
      {
        "text": "Hello",
        "intent": "greeting",
        "entities": []
      },

    {    
       "text": "Hi",  
      "intent": "greeting",   
     "entities": [] 
    },    

   {  
      "text": "Goodmorning", 
      "intent": "greeting", 
      "entities": [] 
    }   

],
    "regex_features": [],
    "entity_synonyms": []
  }
} 

However when I train the model tensorflow_embedding on this model, it says I need to add multiple intents or else training will fail.

How do I do it ?

Why not use pretrained_embeddings_spacy ?

Thank you. But I am buiding customized chatbot for my domain. That’s why I chose to use tensorflow_embedding.

This is just a sample of training examples. I have more. But I want to know how to add multiple intents?

1 Like

In that case, just keep on adding other texts with different intent names like I have done below. I added the intent “bye” with texts “Bye” and “Good Bye”. Just make sure to add these intents in the domain.yml file and also create some stories with these intents.

    {    
       "text": "Hi",  
      "intent": "greeting",   
     "entities": [] 
    },    

   {  
      "text": "Goodmorning", 
      "intent": "greeting", 
      "entities": [] 
    } ,

    {    
       "text": "Bye",  
      "intent": "bye",   
     "entities": [] 
    },    

   {  
      "text": "Good Bye", 
      "intent": "bye", 
      "entities": [] 
    }  

Okay. @GauravRoy48 Thank you very much. I will do so.

1 Like