Quantcast
Channel: Symantec Connect - Products - Articles
Viewing all articles
Browse latest Browse all 818

Choosing a chatbot development framework

$
0
0

As part of an initiative at Symantec to build a chat / voice bot application for Lifelock product, I was tasked with the responsibility of architecting a chat platform. I started out with understanding the chatbot market, curent framework / technologies used and decided on one to build our application.

In this document, I would describe the technical requirements I had to develop a chatbot application and the frameworks I had experimented before choosing one.

Types of chatbot tools

There are two types of chatbot development tools available to build an application

  1. Chatbot platforms

    1. Online eco-systems where chatbots can be deployed and made to interact with other platforms.

    2. Suited for beginners / non-technical people with no coding involved.

    3. Ex: Motion.ai, Chatfuel etc.

  2. Chatbot Development Framework

    1. Pre-defined classes / functions to build chatbot functionality.

    2. Suited for programmers to build bot functionality programmatically.

    3. Ex: AWS Lex, DialogFlow, wit.ai

Our backend services enforce requirements on clients to handle token / session management. Chatbot platforms do not provide out-of-the-box support for tokens, hence a chatbot development framework is preferred which also enables us to build custom processes and  services.

For our use-cases, a chatbot development framework would be used that would be integrated with back-end REST-ful webservices.

 

Typical Requirements of a ChatBot Framework

From a technical perspective, we require a chatbot framework to support the below mentioned requirements.

Diverse programming languages support

Ability to build chatbot in various programming languages is desired to better make use of language paradigms / developer skills. Typical languages we would expect support are Javascript, Node.js, Python and Java.

 

Chatbot Platform Deployment support

Building a chatbot is primarily oriented towards the platform on which it would be deployed.

A few potential platforms for chatbot are:

  1. Facebook Messenger

  2. Google Home

  3. Amazon Echo

A framework that provides ability to deploy / export the chatbot to one / more platforms would be an ideal candidate. This would avoid re-building the application to conform to individual platforms.

 

In-house API Deployment Support

A typical backend service for a chatbot would have web service APIs deployed on a separate cloud platform (in-house / Amazon Web Services / Google Cloud Platform) and be available to access over HTTPS. Since our application involves sensitive member information transferred back-and-forth, we need to manage certificates / network connectivity to prevent any bad actor from intercepting requests.

A chatbot framework that also supports in-house API deployment would be very useful in this case to contain such requests to a private cloud and not transfer over the internet. The data from device to framework would still go through the internet, nevertheless this requirement is specific to data transfer between framework to internal backend APIs.

 

Security Implications

Being a financial application that carries user’s personal information, the chatbot framework needs to be provide sufficient security measures to be able to exchange data securely and prevent spoofing.

Our backend APIs are available as REST-ful webservices authenticated by OAuth 2.0 token framework. The security implication lies with framework providing a reliable / secure storage for tokens. To illustrate, browsers are considered weak storage for tokens (in cookies) while device platforms such as iOS / android provide strong encryption for token storage.

 

Extensibility to Voice Bots

With the rise in number of Alexa / Google Home devices, there is a natural inclination to build both chat / voice bots. A development framework that provides ability to export / import utterances, intents would be ideal to avoid re-building backend services separately for a voice bot.

Chatbot Framework Evaluation

Amazon Lex

The first development framework I played around was Amazon Lex which provides a conversational interface UI to create / manage bots.

My observations so far with AWS Lex are:

  1. It is very straightforward to understand the concepts associated with conversational interface (Intents, Utterances, Slots, Fulfillments etc.)

  2. The Lex console is very simple to be able to build a bot in minutes.

  3. Lex provides the ability to manage session attributes and pass them back / forth to build stateful systems.

  4. Lex also provides the ability to link an existing Amazon user to a Lifelock user and store tokens securely to avoid re-authenticating the member every time.

The primary drawback I experienced with AWS Lex was its dependency on AWS Lambda as backend service. Our backend services are available as REST-ful webservices and it would have been much efficient to directly integrate with ours. We could build a proxy on AWS Lambda to invoke our web services but this would make Lambda a redundant component in our ecosystem. Also, testing from chatbot framework to our web service would be more difficult with Lambda in the pipeline.

DialogFlow (Api.AI)

The second framework I played around with was DialogFlow and my observations  are:

  1. Better utterances to Intent Mapping:

    1. DialogFlow provides better resolution from utterances to intent mapping through its NLP algorithms and is more convenient to use. Lex does strict matching for phrases expecting clients to provide several combinations of utterances.

  2. SDK availability:

    1. DialogFlow has SDK for several languages enabling better integration with 3rd party APIs. This enables us to produce quality code that eliminates JSON request / response mappings and allows us to be compatible with future versions.

  3. Integration support:

    1. DialogFlow seems to support a lot more platforms compared to Lex.

  4. Also supports additional features such as followup-intents (to chain intents) and assigning priority to intents (in case of utterances conflict).

Wit.AI

I also played around with Wit.AI but did not observe any tangible benefits compared with Lex / DialogFlow.

Chatbot Framework Comparison

Feature Description

AWS Lex

DialogFlow (Api.AI)

Wit.AI

Console Support

(for quicker prototyping)

SDK Availability

Multiple Platforms Support

✅✅✅

(Lot more compared to the rest)

API Integration

AWS Lambda

HTTPS

HTTPS

NLP algorithm strength

✅✅

Training Dataset Programmatic Support


Viewing all articles
Browse latest Browse all 818

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>