(This article is related with How to Create a Chatbot using TensorFlow)
Now let’s see how we can customize and improve our Chatbot. First go to the Buddhilive Chatbot GitHub Repository. Then fork your own copy of the project to your GitHub account. Now go to that forked repository. Navigate in to Datasets folder and open train_intent.json file. This file may look something like this;
This is the dataset we are using to train our chatbot. You can clearly identify the JSON data structure we are using here;
- tag: “Tag” refers to the name of the particular intent.
- patterns: “Patterns” refers to some frequently used user queries and input patterns that are related to a specific intent. You can add several patterns seperating with commas.
- responses: “Responses” refers to the responses that matches for a certain input. You can add several different responses that can be given for the same query by separating them with commas.
Using the same data structure you can edit and add more intents to this file. When you train the chatbot with more intents, it will become more versatile.
You can clone your own copy of this repository on your local machine and edit train_intent.json file and commit the changes to your repository.
When you are about to train the chatbot with your customized data, make sure to do the following;
- Go to Google Colabs
- Open the copy of Buddhilive_train.ipynb file that you have saved to your Google Drive.
- Go to the second Code Cell in the notebook where we import dataset from GitHub and change the URL with the URL to your own copy of Buddhilive Chatbot’s repository.
- Do the same to the copy of Buddhilive_Response.ipynb file you have saved to your Google Drive
Now the chatbot will be trained with your new customized intents. Test the chatbot in Buddhilive_Response.ipynb