Multinational Naive Bayes is the classic algorithm for text classification and NLP. For an instance, let’s assume a set of sentences are given which are belonging to a particular class. With new input sentence, each word is counted for its occurrence and is accounted for its commonality and each class is assigned a score. The highest scored class is the most likely to be associated with the input sentence.
What if you’re creating a bot for a major online clothing retailer? For starters, the bot will require a greeting (“How can I help you?”) as well as a process for saying its goodbyes. In between, the bot needs to respond to inputs, which could range from shopping inquiries to questions about shipping rates or return policies, and the bot must possess a script for fielding questions it doesn’t understand.
What began as a televised ad campaign eventually became a fully interactive chatbot developed for PG Tips’ parent company, Unilever (which also happens to own an alarming number of the most commonly known household brands) by London-based agency Ubisend, which specializes in developing bespoke chatbot applications for brands. The aim of the bot was to not only raise brand awareness for PG Tips tea, but also to raise funds for Red Nose Day through the 1 Million Laughs campaign.
Oh and by the way: We’ve been hard at work on some interesting projects at Coveo, one of those focusing squarely on the world of chatbots. We’ve leveraged our insight engine, and enabled it to work within the confines of your preferred chat tool: the power of Coveo, in chatbot form. The best part about our work in the field of chatbots? The code is out there in the wild waiting for you to utilize it, providing that you are already a customer or partner of Coveo. All you need to do is jump over to the Coveo Labs github page, download it, and get your hands dirty!

In 1950, Alan Turing's famous article "Computing Machinery and Intelligence" was published, which proposed what is now called the Turing test as a criterion of intelligence. This criterion depends on the ability of a computer program to impersonate a human in a real-time written conversation with a human judge, sufficiently well that the judge is unable to distinguish reliably—on the basis of the conversational content alone—between the program and a real human. The notoriety of Turing's proposed test stimulated great interest in Joseph Weizenbaum's program ELIZA, published in 1966, which seemed to be able to fool users into believing that they were conversing with a real human. However Weizenbaum himself did not claim that ELIZA was genuinely intelligent, and the Introduction to his paper presented it more as a debunking exercise:
Message generator component consists of several user defined templates (templates are nothing but sentences with some placeholders, as appropriate) that map to the action names. So depending on the action predicted by the dialogue manager, the respective template message is invoked. If the template requires some placeholder values to be filled up, those values are also passed by the dialogue manager to the generator. Then the appropriate message is displayed to the user and the bot goes into a wait mode listening for the user input.
Chatbots give businesses a way to deliver this information in a comfortable, conversational manner. Customers can have all their questions answered without the pressure or obligation that make some individuals wary of interacting with a live salesperson. Once they’ve obtained enough information to make a decision, a chatbot can introduce a human representative to take the sale the rest of the way.
You may remember Facebook’s big chatbot push in 2016 –  when they announced that they were opening up the Messenger platform to chatbots of all varieties. Every organization suddenly needed to get their hands on the technology. The idea of having conversational chatbot technology was enthralling, but behind all the glitz, glamour and tech sex appeal, was something a little bit less exciting. To quote Gizmodo writer, Darren Orf:

Simple chatbots work based on pre-written keywords that they understand. Each of these commands must be written by the developer separately using regular expressions or other forms of string analysis. If the user has asked a question without using a single keyword, the robot can not understand it and, as a rule, responds with messages like “sorry, I did not understand”.

It may be tempting to assume that users will navigate across dialogs, creating a dialog stack, and at some point will navigate back in the direction they came from, unstacking the dialogs one by one in a neat and orderly way. For example, the user will start at root dialog, invoke the new order dialog from there, and then invoke the product search dialog. Then the user will select a product and confirm, exiting the product search dialog, complete the order, exiting the new order dialog, and arrive back at the root dialog.
Regardless of which type of classifier is used, the end-result is a response. Like a music box, there can be additional “movements” associated with the machinery. A response can make use of external information (like weather, a sports score, a web lookup, etc.) but this isn’t specific to chatbots, it’s just additional code. A response may reference specific “parts of speech” in the sentence, for example: a proper noun. Also the response (for an intent) can use conditional logic to provide different responses depending on the “state” of the conversation, this can be a random selection (to insert some ‘natural’ feeling).
Other companies explore ways they can use chatbots internally, for example for Customer Support, Human Resources, or even in Internet-of-Things (IoT) projects. Overstock, for one, has reportedly launched a chatbot named Mila to automate certain simple yet time-consuming processes when requesting for a sick leave.[24] Other large companies such as Lloyds Banking Group, Royal Bank of Scotland, Renault and Citroën are now using automated online assistants instead of call centres with humans to provide a first point of contact. A SaaS chatbot business ecosystem has been steadily growing since the F8 Conference when Zuckerberg unveiled that Messenger would allow chatbots into the app.[25]
At a high level, a conversational bot can be divided into the bot functionality (the "brain") and a set of surrounding requirements (the "body"). The brain includes the domain-aware components, including the bot logic and ML capabilities. Other components are domain agnostic and address non-functional requirements such as CI/CD, quality assurance, and security.
Foreseeing immense potential, businesses are starting to invest heavily in the burgeoning bot economy. A number of brands and publishers have already deployed bots on messaging and collaboration channels, including HP, 1-800-Flowers, and CNN. While the bot revolution is still in the early phase, many believe 2016 will be the year these conversational interactions take off.

But, as any human knows, no question or statement in a conversation really has a limited number of potential responses. There is an infinite number of ways to combine the finite number of words in a human language to say something. Real conversation requires creativity, spontaneity, and inference. Right now, those traits are still the realm of humans alone. There is still a gamut of work to finish in order to make bots as person-centric as Rogerian therapists, but bots and their creators are getting closer every day.
Once you’ve determined these factors, you can develop the front-end web app or microservice. You might decide to integrate a chatbot into a customer support website where a customer clicks on an icon that immediately triggers a chatbot conversation. You could also integrate a chatbot into another communication channel, whether it’s Slack or Facebook Messenger. Building a “Slackbot,” for example, gives your users another way to get help or find information within a familiar interface.

Chatbots are a great way to answer customer questions. According to a case study, Amtrak uses chatbots to answer roughly 5,000,000 questions a year. Not only are the questions answered promptly, but Amtrak saved $1,000,000 in customer service expenses in the year the study was conducted. It also experienced a 25 percent increase in travel bookings.

Closed domain chatbots focus on a specific knowledge domain, and these bots may fail to answer questions in other knowledge domains. For example, a restaurant booking conversational bot will be able to take your reservation, but may not respond to a question about the price of an air ticket. A user could hypothetically attempt to take the conversation elsewhere, however, closed domain chatbots are not required, nor often programmed to handle such cases.
There was a time when even some of the most prominent minds believed that a machine could not be as intelligent as humans but in 1991, the start of the Loebner Prize competitions began to prove otherwise. The competition awards the best performing chatbot that convinces the judges that it is some form of intelligence. But despite the tremendous development of chatbots and their ability to execute intelligent behavior not displayed by humans, chatbots still do not have the accuracy to understand the context of questions in every situation each time.
Founded by Pavel Durov, creator of Russia’s equivalent to Facebook, Telegram launched in 2013 as a lightweight messaging app to combine the speed of WhatsApp with the ephemerality of Snapchat along with claimed enhanced privacy and security through its use of the MTProto protocol (Telegram has offered a $200k prize to any developer who can crack MTProto’s security). Telegram has 100M MAUs, putting it in the second tier of messaging apps in terms of popularity.
Once your bot is running in production, you will need a DevOps team to keep it that way. Continually monitor the system to ensure the bot operates at peak performance. Use the logs sent to Application Insights or Cosmos DB to create monitoring dashboards, either using Application Insights itself, Power BI, or a custom web app dashboard. Send alerts to the DevOps team if critical errors occur or performance falls below an acceptable threshold.
Tay, an AI chatbot that learns from previous interaction, caused major controversy due to it being targeted by internet trolls on Twitter. The bot was exploited, and after 16 hours began to send extremely offensive Tweets to users. This suggests that although the bot learnt effectively from experience, adequate protection was not put in place to prevent misuse.[56]