Echo Dot (3rd Gen) - Smart speaker with Alexa - Charcoal

Use your voice to play a song, artist, or genre through Amazon Music, Apple Music, Spotify, Pandora, and others. With compatible Echo devices in different rooms, you can fill your whole home with music.

Buy Now

Wireless Rechargeable Battery Powered WiFi Camera.

Wireless Rechargeable Battery Powered WiFi Camera is home security camera system lets you listen in and talk back through the built in speaker and microphone that work directly through your iPhone or Android Mic.

Buy Now

Blender Vs Rasa open source chatbots

0
87


In this AI world, automating human efforts into computer based is evolving a lot. Example: Turing test where a machine tries to mimics like a human being and thinks alike human.

Chatbot is a dialog system software application. It is used to have conversations via text or speech. It become very popular in the industries. It is used for automating tasks that do not require skill based talents.

In most typical chatbots, every conversation we have is called ‘utterance’. The utterance then needs to be classified as ‘intent’. The respective intent needs to be carried out with the corresponding action to be taken.

To perform an action, sometimes would require more information like ‘slot’ values. Let us have an example of this.

Restaurant assistant Chabot

In the above dialog flow, ‘utterance’ is every message we type in. Internal mechanism, will be performing NLP techniques to classify ‘intent’. Examples of slot values are the type of cuisine, no of people, and seating preference. Based on the intent, the respective actions will be carried out. Here, the chatbot response is typically performed using an action by chatbot. I am not covering in-depth concepts but this will provide more general concepts of how chatbot internally works.

a. RASA

RASA is open source conversational AI chatbots. It provides open source and enterprise edition chatbots. It has a very strong open source community. Let’s discuss more further details.

Architecture of RASA

Interpreter

Used for converting a raw text (utterance) into intents and entities (slots). This is also called RASA NLU (Natural Language Understanding) component. A raw text will be performed on machine learning models to classify intents and entities.

Tracker

It tracks the conversational state. Every new utterance will be passed in tracker for maintaining state. This is called RASA Core component.

Policy

Defines the Machine learning model pipeline for intent classification and entity identification. Also, used for identifying the type of action should be carried out.

Action

Available all the actions performed. Corresponding action, it will be logged in Tracker

As the above explanation, There are major two components as RASA NLU and RASA Core were responsible for the entire dialog system. A basic example of building your first chatbots using RASA will be available here.

b. Blender

Developed by Facebook AI Research (FAIR). Building Open domain chatbot is very challenging in the ML research. Blender is a part of the ParlAI project where they published a python framework for sharing, training, and testing dialog models, from Open-domain chitchat to VQA (Visual Question Answering).

Example of Blender open domain chatbot

You can use this framework for building your open domain chatbot. The goal is to provide a unified framework for sharing, training, and testing models. Many popular datasets available in one place i.e bAbi task. Seamless integration with Facebook messenger.

Let’s try to understand what are core concepts in Blender, The terminologies are World, Agent, Message, and Teacher.

Terminologies in ParlAI

Agent

Each world, there will be an Agent. An example of an agent includes the model and datasets. Agents interact with each other by taking turns acting and observing ‘acts’. Agent can be a simple bot that repeats back anything that it hears. Agent has two primary methods as observe and act. Observe takes as input an observation which is usually the result of an action taken by another agent, and updates its internal states accordingly. Act produces action from an agent.

1. A Simple Guide to Making Your First Chatbot Game

2. How Does a Chatbot Learn on Its Own?

3. 5 ways to add empathy to your app

4. WhatsApp for Business: A Beginners Guide

Messages

Observed by an agent (observations) and returned by an agent’s act function (actions). The below is a format of message looks like

messages format

All the above fields are optional. Each task should use them accordingly what kind of information available in the task. Example: SQuAD has an answer_starts field, which is available in the “squad::index” task. (For those not aware of SQuAD, it is Standford Question answering datasets.

Teacher

The teacher is a special type of agent where it implements the ‘act’ and ‘observe’ functions as all agents do. But, it keeps track of metrics which they return via a ‘report’ function.

Below is an example of how an agent and teacher interact with each other. bAbi task presents the Question Answering systems where it tests the understanding and reasoning of natural language.

Observations exchanged between a student (model) Agent and a bAbI task Teacher)

World

As the name suggests, an environment is called ‘World’ in which agents interact with each other.

In these articles, we understand the basics of chatbot, how it works, and terminologies of some of the open source frameworks. This article is not comparing both open source frameworks, but trying to explain the concepts in each one. I feel, Blender is one of the game changer in open domain chatbot framework.

Note: This is my very first article. Please give your support or leave a comment below for any improvement or suggestions. This helps me to rectify my mistakes in further articles. You can reach me at https://www.linkedin.com/in/narendra-prasath/

Reference:



Read More

LEAVE A REPLY

Please enter your comment!
Please enter your name here