Brook Preloader

Blog

Comparison Between Chatbots Development With Dialogflow And Tensorflow

Chatbot is a computer program designed and developed to communicate with the user stimulating the conversation in a Natural Language. Chatbot uses the Natural Language Processing (NLP) which is a subdomain of Artificial Intelligence (AI) and the frameworks like Dialogflow, IBM Watson and Kore.ai provide the platform to build the conversation to interact with user. As per Gartner reports, “Chatbots are the new apps and by 2020 more than 85% of businesses plan to involve chatbots in their platforms”.

Chatbot development is done in two types – Closed Domain and Open Domain. Frameworks like Google Dialogflow and IBM Watson make the closed domain chatbot development easier by providing user-friendly features. On the other hand, Tensorflow is a free, open-source software library for dataflow and differentiable programming across a range of tasks. It is a symbolic math library, used for machine learning (ML) applications such as neural networks.

Following is the pictorial comparison and representation of overall satisfaction of both the frameworks based on the multiple factors such as main functionality, collaboration features, customization, integration, ease of use, general impression, security, mobility, help and support.

Source: FinancesOnline (https://comparisons.financesonline.com/tensorflow-vs-dialogflow)

Types of Chatbot Development

  1. Closed Domain Chatbot: Closed domain chatbot is one of the approaches followed to develop the chatbot which is specific for a certain task or domain. A closed domain chatbot is often referred to as a scripted bot. It cannot resolve/answer to the queries or perform a task which is not predefined. Closed domain chatbots are pre-defined with a conversational flow and so when a user throws a query, the bot responds with a pre-defined script from the library/framework.
  2. Open Domain Chatbot: Open domain chatbot is another way of developing chatbot which can perform multiple number of task irrespective of the domain or task. An open domain chatbot is also referred to as AI Chatbot. AI bots or intelligent bots use Natural Language Processing to answer user queries which are in the form of text/speech format. The bots utilize ML and respond back with most appropriate answer possible from the training phrased. Typically, AI bots are preferred over scripted bots.

Platforms to develop Chatbot

For ease of development, there are multiple platforms available in market which can be used for the development of a chatbot. Platforms like Dialogflow, Wit.ai, LUIS, Watson and Lex are backed by technology giants like Google, Facebook, Microsoft, IBM and Amazon respectively. These platforms provide the interface to train and script the conversation whereas, Tensorflow is an open source software library for the dataflow and differential programming. It also backed by Google, which doesn’t provide any GUI but allows the developer to create chatbot from scratch with more customization and tons of features that can be integrated using Tensorflow.

Let us consider Dialogflow and Tensorflow for further discussion.

Dialogflow – Google-backed Dialogflow (formerly known as api.ai) is a NLP platform that can create a chatbot by creating the conversational flow in the Dialogflow UI. Intents and Contexts are primary and key concepts of Dialogflow which build the chatbot conversation. Intents create bridge between user queries and the necessary action that needs to be taken by the bot. Contexts are string values, which are used for differentiating user queries/requests. When Dialogflow receives a user request in the form of a sentence, Dialogflow applies ML model and it is first classified to determine if it matches a known intent. If the user’s request/query matches with the context then Dialogflow will reply with the proper response to the user queries.

Pros:

  • Less server side coding
  • Integration with multiple social media platforms like Facebook, Slack, Twitter and so on
  • Can process large and complex flows using intents and contexts

Cons:

  • It is highly impossible if the identical intent present in the different context
  • Difficult to control the flow of the conversation and the bot tends to misunderstand the user requests
  • Limitation of understanding the synonyms and hyponyms
  • Can only process the sentence but can’t understand the same

TensorflowTensorflow is an open source library which can be used for any application in real time. By using Tensorflow we can perform more complex tasks with ease. There are multiple methodologies to build a chatbot in NLP. Tensorflow offers the features which help developer to develop a chatbot from the scratch. It also provides the architecture to develop a chatbot by utilizing the deep neural network. Bag of Words, Word2Vec, Tf-IDF are some NLP methodologies which can be utilized to develop a chatbot. In contrast to Dialoglflow, we can perform the Natural Language Understanding (NLU) and Natural Language Generation (NLG) along with added features like sentiment analysis, which all come under the hood of NLP.

Pros:

  • NLP and many other applications possible in AI domain can be done on Tensorflow
  • We can add multiple value added features like Machine Vision (MV) and Sentiment Analysis to chatbot based on its personality
    • Example: For a healthcare related chatbot, we can utilize machine vision efficiently for disease identification
  • User friendly features such as graphs, library management, debugging, scalability and pipelining

Cons:

  • Should have some programming skills along with domain knowledge about Machine Learning
  • Tensorflow is very low level with a steep learning curve
  • Too complicated or cluttered code

As seen above, both of the approaches have their respective pros and cons. A framework like Dialogflow has quick hands-on feature whereas Tensorflow needs some learning curve to get hands-on. But, both the platforms have certain crucial features and miss some due to their platform limitation. In order to build an effective chatbot which can be robust, reliable and scalable, we need to adopt the Hybrid approach.

Hybrid Approach – A hybrid approach is a combination of utilization of NLP platform like Dialogflow, IBM Watson and powered by Tensorflow which can handle the limitation faced by NLP framework in real-time. This approach enables the chatbot developer to handle the conversation-related tasks more easily and gives it to backend/python script which is powered with Tensorflow features.

1. User Interacting with Communication Channel.

2. Communication Channel send voice/text message to Dialogflow.

3. Dialogflow will finalize the intent and context of conversation and triggers the backend for the specific task.

4. Python will perform the assigned task more effectively with Tensorflow and transact with the Database.

5. Database will confirm the transaction.

6. Task result will be sent to Dialogflow.

7. Dialogflow communicates back with proper response to user.

8. Communication channel will convert the message in the form of voice/text

Industry Employing the Chatbot

Picture Courtesy: Grand View Research (https://www.grandviewresearch.com/industry-analysis/chatbot-market)

Health Care – For now, chatbots in health care industry are utilized to assist the doctor/hospital in the automation of certain easy, manual tasks like patient management (call/visit scheduling) and keeping the track record of patients. We can also use AI (especially deep learning) for self-diagnosis medical chatbot, which can instantly provide the solution to diseases that are primitive in nature.

Finance – In finance we can utilize chatbots in numerous tasks. Simple tasks like customer support, user engagement, customer feedback analysis can be automated by making use of closed domain chatbot.

E-Commerce – E-Commerce is the best domain to utilize chatbots in the day-to-day activities. E-Customer chatbots, Personalization and increase sales/conversion/retention are the main fields where we can efficiently employ chatbots. Analytics is also the one of the main application in E-Commerce which help to understand and gather insights of data.

Chatbot in Health Care sector – A case study:

Health care sector is one of the main industries employing chatbots more than any sector.Health care deserve the complex functionality like disease identification and prediction, real-time assistance (open domain chatbot) but the most of the user’s utilize the simple functionalities like scheduling appointment and patient engagement (closed domain chatbot).

Chatbot with capabilities such as MV (powered by Tensorflow/PyTorch) and NLP (Text Analytics/Sentiment Analysis) can help the doctor/user to perform the following actions:

  1. Personalization and predictive machines for disease identification
  2. Prevention of mistakes happening in the field of medicine
  3. Early detection and diagnosis of key diseases
  4. Understanding the user’s feedback and giving a response based on their sentiment

Conclusion

As explained above, we need to go for the hybrid approach to develop a chatbot that is robust, reliable and scalable. This approach not only increases the quality, performance and accuracy of the chatbot but will also be more reliable in nature while handling real-time scenarios.

Contact for further details

Chanabasagouda PATIL
Sr. Technical Consultant – Data Science & Artificial Intelligence (AI)
chanabasagoudap.in@mouritech.com
MOURI Tech

0 0 vote
Rating
guest
0 Comments
Inline Feedbacks
View all comments