Chatbot - Design and Architecture

What is chatbot?

A chatbot, also known as a dialogue system or a conversational agent, is an intelligent program which help to imitate a conversation with a users. In the recent times chatbot technology gained lots of popularity and It also evolved, thanks to the growing popularity of AI and ML. Chatbots are proving as a valuable tool in many situations and are visible in many aspect of our daily lives.

A chatbot is an intelligent agent that intends to hold natural conversations with human. It is software application, with the help of natural language processing and machine learning it simulates human conversation into natural language via text or text-to-speech.

Chatbot usage started in many customer support applications, it have range of potential benefits. Most notably they provides responses and solutions that are instant, reliable and consistent. All these applications and characteristic makes chatbots a powerful tool in many different areas. Chatbot usage also evolved in the e-commerce and healthcare industry.

Architecture of Chatbot

Design principles for ChatBot

Chatbot can be designed using 2 approachs

Rule Based

A rule-based chatbot processes information and provides responses based on a set of predefined rules with the use of pattern matching algorithms. The user input is classified as a pattern, and the chatbot selects a predefined answer by matching the pattern with a set of stored responses. However, the responses are repeated and lack flexibility and originality as the knowledge is set by the developer in advance

Machine learning

The recent advancement in machine learning has made it possible to develop more intelligent chatbots. Chatbots that adopt machine learning approaches use machine learning algorithms to extract information and generate responses and are able to improve through previous conversations. An extensive training set is required for machine-learning-based chatbots. Two types of models can be used, retrieval or generative. Retrieval-based models involve choosing the optimal response from a set of responses, and generative models, on the other hand, use deep learning techniques to generate the response. 

Types of Chatbot

CHATBOTS can be classed using other variables, such as the interaction level and how responses are generated. A brief schematic classification of CHATBOT is shown above.

  • Knowledge Domain
  • Service Based
  • Goal Driven
  • Response Generation

Knowledge Domain: This first type classified according to the knowledge available to them or the amount of data trained. They are further classified into Open Domain and Closed domain. Open-domain bots can address general topics and answer them appropriately. Closed domain bots focus on one specific area of knowledge and may not answer other questions. For instance, booking Bot won’t tell you the name of famous singer. It may tell you a joke or reply the way your day is, but it is not meant to do any other tasks, considering that its job is to book a flight and give the user all the necessary information about the booked flight [9]. The second one is service provided; these Bots are sentimental proximity to the user, how much intimate interaction occurs, and depends on the Bot’s task. 

Service Based: This type further classified as Interpersonal, Intrapersonal, and Inter-agent. Interpersonal bots are for communication and allow services such as Table booking in Restaurants, Train booking, FAQ bots, etc. These CHATBOTS are supposed to get information and pass same details to the user. These types of BOT can become user-friendly and likely to remember previous information about the user. Intrapersonal bots will exist in the user’s personal domain, such as chat applications like Facebook messenger, and WhatsApp, and perform tasks under the user’s intimate part. Managing calendar, storing the user’s opinion, etc. These bots are the companions of the user and understand them as a human. Inter-agent bots are becoming ubiquitous as all CHATBOTS require opportunities for intercommunication. There is an emerging need for Inter-agent CHATBOT protocols for communication. The Alexa-Cortana integration is one example of an Inter-agent BOT. 

Goal Driven: This is designed for the primary purpose they are intended to achieve. It is further classified into Informative, Conversation and Task-based Bot. Informative bots provide the user with intel or data from a fixed database, like the FAQ BOTS and inventory database at the warehouse. Conversational or Text-based bots try to speak with the user as another human being, and their purpose is to appropriately respond to the user’s requests. As a result, their goal is to pursue the user’s conversation using techniques such as cross-questioning, avoidance, and politeness, for instance: Alexa and Siri. Task-Based bots carry out a particular task, such as booking a room in a motel or assisting somebody. These CHATBOTS are smart when it comes to requesting information and comprehending user input. Booking a room in a motel and Reservation of Table at a Restaurant is an example of a Task-based Bot.

Response generation: This technique is focused on how the response generates and method for generating responses for processing inputs. It is further classified as Intelligence Method, Rule-based system and Hybrid. Intelligence Methods are knowledgeable systems to generate responses, and they use the natural language understanding (NLUs) component to comprehends the user’s query. Such systems are used where a narrow domain and sufficient data exist to form a network system. Rule-based system bots interact with users with the defined outline trees. It is a flowchart where conversations are predicted in such a way as to anticipate what a client might ask and how the Bot should respond. Hybrid systems are the combination of rules like Algorithms and machine learning. Example, a system uses an outline flow chart to manage conversation direction, but they use natural language processing (NLPs) to respond.

Chatbot Design and Engineering Approach

Parsing involves input text analysis and uses several NLP functions to manipulate the inputs, such as Python NLTK decision trees. Besides, it includes Dependency Tree, Syntactical Parsing, Parts-of-Speech Tagging, Named Entity Recognition, Entity Parsing, and Topic Modeling.

Pattern matching is the technique employed by almost all CHATBOTs. In a question-answering Bot, systems depend on the types of correspondence, such as natural language inputs, simple statements, or domain-specific inquiries.

AIML Artificial intelligence Mark-up Language, insights from Pattern Matching and Pattern Recognition technique. The stimulus-response approach is to model natural language to understand the human and Bot dialogue system.

Chat script comes into play when no matches happen with user input phrase in AIML. It emphasizes the structure best sentence for constructing a sensitive default response. It involves a network of functionalities, for instance, factor ideas, logic, etc. 

SQL tool used to memorize earlier conversations for Bot.

Markov Chain is used to construct better probabilistic and precise responses. Markov Chains states a fixed probability of every letter or word occurrence in the same textual dataset.

Language tricks are a form of phrases and fragments of sentences available for Bot to attach knowledge base such that make that part more convincing. Canned responses are that predetermined answers to some particular questions are known, Typo errors and simulating keystrokes, personal history, and Non-Sequitur are not logical conclusions used as language trick. These linguistic tricks are used to assure user input and provide alternative responses to respective questions.

An ontology represents a structural representation of the domain’s entities and relationships between them. It is a treelike arrangement that assembles all entities into one realm, their subclasses, and instances. Additionally, it establishes connections between the tree leaves by specifying one way, two ways, and transient relationships. Moreover, it creates links between the tree leaves by defining unilateral and bilateral pathways and temporary relations. 

Conclusion

A chatbot is an impeccable example of human-computer interaction. In recent years, there has been a significant advancement in the development of chatbots, and they have evolved into one of the most powerful and widely adopted applications. However, this is only the beginning of chatbots, and to meet their full potential, it requires technological and business attention and effort to understand how they work and how they are developed. 

Leave a Reply

Your email address will not be published.