Contact Us

Contact Us

AWS Lex vs Google DialogFlow

Overview

Chatbots have revolutionized the user experience when it comes to customer communication.  These intelligent programs have automated the slow customer responding approaches with quick, accurate and intuitive solutions.  We at Technosoft Solutions recently worked on creating a voice-enabled platform for a customer that will also include chatbots integration.  Requirements for a chatbot for our use case were:

1)      Good performance, as some chatbots are slow to load on a webpage

2)     Must work on the web and mobile/responsive

3)     Must provide HIPAA compliant security as it was to be used in a Healthcare domain

4)     Must support voice and text

5)     Must allow the integration into APIs

Amazon’s Lex and Google’s Dialogflow are two important choices but deciding which chatbot platform to use was not easy. We decided to do thorough research on key features of both platforms to reach the conclusion.

The areas we targeted to compare in two platforms include:

a)      Features that two platforms provide

b)     Performance; after all this is why we use chatbots

c)      Device to NLU compatibility

 

Feature Comparison

Serial #FeatureAWS LexGoogle DialogFlowComments
1LanguagesEnglish OnlySupports more than 18 languageshttps://cloud.google.com/dialogflow-enterprise/docs/reference/language
2Voice EnabledYes – via separate service known as AWS ConnectYes – via Telephony Gateway IntegrationAWS Connect – It is a cloud-based contact center service that makes it easy for any business to deliver better customer service at a lower cost. This can be integrated with the chatbot configured using AWS Lex.

Telephony Gateway – DialogFlow provides out of box integration of the configured chatbot with Telephony gateway. This can be used to set up a phone number to receive calls and respond to the users as per the configured bot.

3SMS EnabledNo out of box support – can be integrated with any messaging service like TwilioNo out of box support – can be integrated with any messaging service like Twilio
4Voice CountriesPhone numbers available in multiple countries depending on the AWS Connect service region where it is configured for your accountProvides US only numbersUS only numbers can be called from out of US as well
5SMS CountriesDepends on Twilio – https://www.twilio.com/sms/coverageDepends on Twilio – https://www.twilio.com/sms/coverage
6Audio OutputYes – via separate service known as AWS PollyYes – out of box support
7Small TalkNoYes – supports casual talk
8Knowledge ConnectorsNoYes – You can provide a bunch of documents for the bot to train on and provide responses to the queries automatically based on the documents
9Sentiment analysisYes – via separate service AWS ComprehendYes – out of box support
10Product StabilitySeparate services provided seem more completeMany features like Knowledge Connectors, Small Talk, Telephony gateway are still in BETA
11Allows Raw Request MessageNoYes
12Intent DetectionWeakVery StrongYou don’t have to say the exact question for DialogFlow to detect intent, it can detect intent with a couple of words as well. Lex sometimes picks up totally irrelevant intent from the question as well.
13Web ChatbotNo – Have to develop a custom one using the APIsYes – Provides out of box integration with a built-in chatbot
14IntegrationsFacebook, Slack, TwilioFacebook, Slack, Twilio SMS, Viber, Twitter, Twilio IP, Skype, Telegram, Kik, Line, Cisco Spark, Amazon Alexa, Microsoft Cortana
14PerformanceSee the sheet named as “Performance Comparison” for more details
15Devices CompatibilitySee the sheet named as “Device to NLU Compatibility” for more details

Performance Comparison

Lex with Auth vs DialogFlow without Auth
QueryAmazon Lex (ms)Dialogflow (ms)Difference
Are there services covered before I meet my deductible28854462439
Do I need a referral to see a specialist39737720
Will i pay less if i use a network provider305395-90
What is the overall deductible3873861
What is the out of pocket limit for this plan387388-1
What is not included in the out of pocket limit293468-175
Are there other deductibles for specific services315414-99
TOTAL496928742095
Lex with Auth vs DialogFlow with Auth
QueryAmazon Lex (ms)Dialogflow (ms)Difference
Are there services covered before I meet my deductible1254756498
Do I need a referral to see a specialist369750-381
Will I pay less if I use a network provider445768-323
What is the overall deductible485895-410
What is the out of pocket limit for this plan364940-576
What is not included in the out of pocket limit425834-409
Are there other deductibles for specific services330771-441
TOTAL367257142042
Notes:
1. AWS Lex is always triggered with signature for authentication.
2. DialogFlow with Auth will be used for API calls e.g. from mobile apps.
3. DialogFlow without Auth is being used in web chatbot agent and Telephony etc.

Device to NLU compatibility

Service / DeviceTelephoneMobile phoneAndroid phoneiPhoneGoogle AssistantAlexaSiriBixby
Amazon’s LexOption 1
A Lex chat-bot can be integrated with AWS Connect

 

Option 2
A Lex chat-bot can be integrated with Twilio Voice

Since the core architecture suggests SMS for phones, we will be leveraging the integration of Twilio SMS for the chat-botSince the core architecture suggests SMS for phones, we will be leveraging the integration of Twilio SMS for the chat-botSince the core architecture suggests SMS for phones, we will be leveraging the integration of Twilio SMS for the chat-botIn order to get anything/everything that user has spoken, we can have a catch-all intent defined within Google Assistant Action, which would trigger a cloud function. That cloud function would pass on the user input to the Lex chatbot, which would perform its own business logic and return an appropriate response. The response would be transformed to suit the response syntax of Google’s AssistantOption 1
Alexa doesn’t give the user-spoken text, in general. There is a workaround around a slot type to capture it. The slot type is AMAZON.SearchQuery. We are not sure at this point whether our skill will be approved by Amazon since this is against their ideology.

 

Option 2
An alternative approach would be to use built-in capabilities of Alexa i.e. Creating an Alexa skill that will do its own NLP and NLU part.
We can export the existing Lex chatbot as a skill and import it into Alexa but there are two limitations for this procedure:
1. Session attributes, created as a part of the chatbot, can’t be used as they are not supported by Alexa Skills Kit.
2. Punctuation marks are not supported by the Alexa Skills Kit.

Siri only provides custom intents for specific domains and Tok+ domain does not fall in any of these categories.

An only possible option could be to open up an app using Siri and in that app, we develop a chatbot using the agreed upon NLU behind the scenes and using the Speech framework for Speech-Text-Speech in the app itself.
This will only be possible in Siri on iPhone scenarios and will not work in Siri on Apple Homepod scenario either.

For smartphones, we can best utilize the platform capabilities if the user interacts via SMS or a Phone call aka Voice.

TBA
Google’s DialogflowOption 1
The telephony gateway feature (Beta) provides a telephone interface to the chat agent

 

Option 2
The chat agent can be integrated with Twilio Voice

Since the core architecture suggests SMS for phones, we will be leveraging the integration of Twilio SMS for the chat agentSince the core architecture suggests SMS for phones, we will be leveraging the integration of Twilio SMS for the chat agentSince the core architecture suggests SMS for phones, we will be leveraging the integration of Twilio SMS for the chat agentDialogflow’s Actions on Google integration handles the communication between Google Assistant and a chat agent. It would require an extra intent configured primarily for Google AssistantOption 1
Alexa doesn’t give the user-spoken text, in general. There is a workaround around a slot type to capture it. The slot type is AMAZON.SearchQuery. We are not sure at this point whether our skill will be approved by Amazon since this is against their ideology.

 

Option 2
An alternative approach would be to use built-in capabilities of Alexa i.e. Creating an Alexa skill that will do its own NLP and NLU part.
The Alexa exporter for Dialogflow allows one to create an Amazon skill with the same interaction model with that of Dialogflow chat agent

TBA