Just last month, Google launched its latest Google Assistant. To help readers get a better glimpse of the redesign, Google’s Scott Huffman explained: “Since the Assistant can do so many things, we’re introducing a new way to talk about them. We’re them Actions. Actions include features built by Google—like directions on Google Maps—and those that come from developers, publishers, and other third parties, like working out with Fitbit Coach.”

The most advanced bots are powered by artificial intelligence, helping it to understand complex requests, personalize responses, and improve interactions over time. This technology is still in its infancy, so most bots follow a set of rules programmed by a human via a bot-building platform. It's as simple as ordering a list of if-then statements and writing canned responses, often without needing to know a line of code.
A chatbot that functions through machine learning has an artificial neural network inspired by the neural nodes of the human brain. The bot is programmed to self-learn as it is introduced to new dialogues and words. In effect, as a chatbot receives new voice or textual dialogues, the number of inquiries that it can reply and the accuracy of each response it gives increases. Facebook has a machine learning chatbot that creates a platform for companies to interact with their consumers through the Facebook Messenger application. Using the Messenger bot, users can buy shoes from Spring, order a ride from Uber, and have election conversations with the New York Times which used the Messenger bot to cover the 2016 presidential election between Hilary Clinton and Donald Trump. If a user asked the New York Times through his/her app a question like “What’s new today?” or “What do the polls say?” the bot would reply to the request.
Along with the continued development of our avatars, we are also investigating machine learning and deep learning techniques, and working on the creation of a short term memory for our bots. This will allow humans interacting with our AI to develop genuine human-like relationships with their bot; any personal information that is exchanged will be remembered by the bot and recalled in the correct context at the appropriate time. The bots will get to know their human companion, and utilise this knowledge to form warmer and more personal interactions.
The main challenge is in teaching a chatbot to understand the language of your customers. In every business, customers express themselves differently and each group of a target audience speaks its own way. The language is influenced by advertising campaigns on the market, the political situation in the country, releases of new services and products from Google, Apple and Pepsi among others. The way people speak depends on their city, mood, weather and moon phase. An important role in the communication of the business with customers may have the release of the film Star Wars, for example. That’s why training a chatbot to understand correctly everything the user types requires a lot of efforts.
There are different approaches and tools that you can use to develop a chatbot. Depending on the use case you want to address, some chatbot technologies are more appropriate than others. In order to achieve the desired results, the combination of different AI forms such as natural language processing, machine learning and semantic understanding may be the best option.

I will not go into the details of extracting each feature value here. It can be referred from the documentation of rasa-core link that I provided above. So, assuming we extracted all the required feature values from the sample conversations in the required format, we can then train an AI model like LSTM followed by softmax to predict the next_action. Referring to the above figure, this is what the ‘dialogue management’ component does. Why LSTM is more appropriate? — As mentioned above, we want our model to be context aware and look back into the conversational history to predict the next_action. This is akin to a time-series model (pls see my other LSTM-Time series article) and hence can be best captured in the memory state of the LSTM model. The amount of conversational history we want to look back can be a configurable hyper-parameter to the model.

This is a lot less complicated than it appears. Given a set of sentences, each belonging to a class, and a new input sentence, we can count the occurrence of each word in each class, account for its commonality and assign each class a score. Factoring for commonality is important: matching the word “it” is considerably less meaningful than a match for the word “cheese”. The class with the highest score is the one most likely to belong to the input sentence. This is a slight oversimplification as words need to be reduced to their stems, but you get the basic idea.
The term "ChatterBot" was originally coined by Michael Mauldin (creator of the first Verbot, Julia) in 1994 to describe these conversational programs.[2] Today, most chatbots are accessed via virtual assistants such as Google Assistant and Amazon Alexa, via messaging apps such as Facebook Messenger or WeChat, or via individual organizations' apps and websites.[3][4] Chatbots can be classified into usage categories such as conversational commerce (e-commerce via chat), analytics, communication, customer support, design, developer tools, education, entertainment, finance, food, games, health, HR, marketing, news, personal, productivity, shopping, social, sports, travel and utilities.[5]