Chatbot

Chatbot

A chatbot is a service, powered by rules and sometimes artificial intelligence, that you interact with via a chat interface. Essentially, a chatbot is just another way of having a user interface for an application. But you may ask, why bother building another user interface for my application if I already have a website and/or a mobile app.

That’s because 90% of the time we spent on mobile is on email or messaging platforms. It’s the perfect way to get your application closer to the users, there’s no install needed, no unsecured ads to obscure websites, it’s just the user and a messaging platform (Facebook Messenger, Telegram, Kik, Skype, etc.) where the bot lives.

ChatterBot is a Python library that makes it easy to generate automated responses to a user’s input. ChatterBot uses a selection of machine learning algorithms to produce different types of responses. This makes it easy for developers to create chat bots and automate conversations with users.
How Chatbot works

ChatterBot is a Python library designed to make it easy to create software that can engage in conversation. An untrained instance of ChatterBot starts off with no knowledge of how to communicate. Each time a user enters a statement, the library saves the text that they entered and the text that the statement was in response to.

As ChatterBot receives more input the number of responses that it can reply and the accuracy of each response in relation to the input statement increase.

The program selects the closest matching response by searching for the closest matching known statement that matches the input, it then chooses a response from the selection of known responses to that statement.

What kinds of machine learning does ChatterBot use?

In brief, ChatterBot uses a number of different machine learning techniques to generate its responses. The specific algorithms depend on how the chat bot is used and the settings that it is configured with.

Here is a general overview of some of the various machine learning techniques that are employed throughout ChatterBot’s codebase.

The program selects the closest matching response by searching for the closest matching known statement that matches the input, it then chooses a response from the selection of known responses to that statement.

Search algorithms

Searching is the most rudimentary form of artificial intelligence. To be fair, there are differences between machine learning and artificial intelligence but lets avoid those for now and instead focus on the topic of algorithms that make the chat bot talk intelligently. Search is a crucial part of how a chat bot quickly and efficiently retrieves the possible candidate statements that it can respond with.

Some examples of attributes that help the chat bot select a response include

  • the similarity of an input statement to known statements.
  • the frequency in which similar known responses occur.
  • the likeliness of an input statement to fit into a category that known statements are a part.

InnoFreedom