Machine Learning in RASA

How to integrate machine learning module in custom action in RASA ?

You can write any Python code in a custom action

1 Like

as suggested by Chris you can write using custom action, but can you be more specific about what machine learning algorithm you want to use with Rasa?

1 Like

Hi Guys i have machine learning model in which if you give QUESTIONS it will give you the ANSWER using semantic search its just a model now i want to integrate it with RASA but i don’t have any story or NLU for it because everything is a ML Model for me means i want to directly run RASA CUSTOM ACTIONS no NLU,STORiES or DOMAIN

@VNY Its fine if you have Q/A but I just want to know more about semantic search (are you using any API for the same or using some external packages for fetching the answers?

You need to have some training examples in nlu.yml for training the bot. You also need some bot/user stories and in stories or rules, you need to mention the actions: for custom action code so that it will execute your ML code. For domain, it’s not mandatory if you are using dispatcher in a custom action.

1 Like

i am using cosine similarity for Q&A and according to QUESTIONS it give me ANSWER with high confidence score

@VNY how? do you have any database?

please tag me always with @ nik202

No Nikhil no database i have pickle file of ML thats it

@VNY next time please tag me, else I will not reply and call me Nik ( by the way who is Nikhil :stuck_out_tongue: )

@VNY means you have pickle data and fetching from that right? Is that code is running fine on local machines using Python IDE or Notebook?


  1. Yes there is a code running in notebook i have trained my ML Model with 400 questions and its answer
  2. my prediction is like this whenever the user ask questions it will go to the question corpus and match with the user asked question whenever question match with more than 70% of confidence score we will we will return the answer for the particular questions
  3. if we create NLU,STORIES and DOMAIN it will be time consuming since data is being update every time means we can expect around 6000 to 40000 questions and answer in future every time we cant update NLU,STORIES and DOMAIN but with ML we can train as many lakh of data points in few MB of .pkl file and we can use it

Thanks for your time really appreciated.