· Jun 5, 2020 3m read

Help My ChatBots to Learn the language!

Hi everyone! If it doesn't bother you, could you help me teach my bots to talk?

Open my chatbot here: Help my chatbots to talk!

What? Aren't your chatbots smarts?

Smart isn't the best term for this scenario. They are trained but with little data! Most of chatbot solutions uses Machine Learning to create a way to talk with people and Machine Learning needs one important thing to performs well: DATA

How does it work?

A simple way to explain: imagine someone who has a brain but dont have any experience in his life he just born. In this scenario the person has to learn how to speak looking others speaking taking classes watching movies etc. This human learning process can be comparable to a machine learning model. You have to expose the machine learning model to situations that can teach him and these situation could be DATA.

 So a chatbot its just a dictionary or a parrot...

Absolutely not. The first problem to use this approach is: for each sentence that the chatbot receives someone has to teach exactly what to answer. We can go inside this problem and try to predict how many different sentences we can form... but obviously is not a way to solve the problem. To solve this problem there are plenty machine learning techniques to after training the model with certain data amount it will perform well in subjects next to the training data. For it the program use data of other conversations to learn patterns, words, synonyms, meanings and this process result in a machine learning model.

What exactly your chatbots are capable to do?

Now they just can predict the sentence intention and with this prediction answer you. Imagine after training the bot he just have those intentions in "mind":

  • Intention: "Greeting" , Answer: "Hi!"
  • Intention: "Goodbye" , Answer: "Bye!"
  • Intention: "Stop speaking." , Answer: "ok."

And a person send a sentence to him: "Did you come here by car?". Note that for us this sentence has nothing in relation to the intentions. But probably the model will score it as "chance of be in an intention" with small accuracy and will return something like this:

For sentence "Did you come here by car?" the most significant intentions that I've found:

  • Goodbye: 5% of accuracy
  • Greeting: 3% of accuracy

So with this correlation the chatbot probably will decide to answer you: "Bye!". But why? It isnt better to stay silence if you dont know what to answer? Probably, but in a shallow explanation he prefers to reply you with the best answer that he thinks and at least you wont think he doesnt have interest in you.

And if I train well a bot its the job done?

Most of time no. Even if he starts performing well there is a good chance to lost the accuracy by the time. Just compare the different ways to talk between old people and young people, the language is alive, all time we chance our way to talk and for the chatbots this end in: need new data to train or/and new techniques do predict. So is common to regularly monitoring the models performance and retrain the model with new data. THATS MY CASE NOW! Help my chatbots to talk!

If this article helps you or you like the content vote:
This application is at the current contest on open exchange, you can vote in my application iris-python-suite here

Discussion (3)0
Log in or sign up to continue