BOTfriends Preview

Chatbot Operations

--> to the BOTwiki - The Chatbot Wiki

Chatbot Operations begins after the development phase of the chatbot and usually requires the Go Live, i.e. the publication of the chatbot. It is therefore about the operation of the chatbot. After real users interact with the chatbot, there is a lot of potential for optimisation and, above all, the chatbot must be constantly trained.

The aim is to optimize the chatbot both in the short and long term.

When optimising the chatbot in the short term, the conversations with the users should still be checked daily directly after going live. This can then be reduced after a certain level of training of the chatbot. The most important thing is to train the chatbot. This means correcting incorrect intent assignments, matching new training phrases and adding new content.

In the long term, consideration should be given to whether, for example, the chatbot was the right one. Messenger service was the right one, which existing services work well or poorly, which other questions or processes the chatbot can open up, or whether you want to roll out in other languages or countries.

Chatbot operations can also only be run efficiently with functioning analytics to measure against its goals or KPIs. Own analytic tools can be built or third party tools like Chatbase or Dashbot can be integrated.

Chatbot operation also includes an intent management guideline, which defines processes and rules on how new content is added to the chatbot and what should be taken into account. These guidelines cover topics such as intent granularity, correlation, naming conventions and approval processes.

Chatbot Operations

 

> Back to BOTwiki - The Chatbot Wiki

 


BOTfriends Preview

Rasa NLU

--> to the BOTwiki - The Chatbot Wiki

Rasa NLU is the NLU component of the Rasa stack, which also includes the Rasa Core is also included. Together they form an open-source solution for chatbots. [1]

function

The NLU has two main tasks.

Intent recognition is the recognition of user intentions. To do this, the NLU must be trained with sufficient utterances. The NLU returns all associated intents ordered by the confidence score. Rasa therefore has multi-intent matching.
In addition, Entity Recognition of the RASA NLU is responsible for extracting important information from natural language. For this purpose, Rasa provides predefined Entities such as postcodes or time information. In addition, there is also the option to define use case-specific entities and to train them with the help of the NLU. [2]

superstructure

The structure of the RASA NLU is fully configurable and is defined with the help of the so-called "pipeline". This defines how the models are generated with the training data and which entities are extracted. Users can choose between the spaCy and the Tensorflow pipeline. The biggest difference lies in the way the models are generated.

The spaCy pipeline relies on already existing models and can only be used for some languages, such as German or English.

The Tensorflow pipeline, on the other hand, must be trained with its own training data. The advantage is that any language can be used. Therefore, the pipeline is usually selected based on the number of utterances available.

Besides the configuration of the Intent Recognition, the Entity Extraction can also be configured. For this, spaCy's existing entities, custom entities with sklearn or the entity extraction of duckling can be used. Duckling gives very good results with numbers, times, currencies and distances. [3]

> Back to BOTwiki - The Chatbot Wiki

Sources

[1] [https://rasa.com/
[2] https://rasa.com/docs
[3] https://rasa.com/docs/nlu/choosing_pipeline/


BOTfriends Preview

Clustering

--> to the BOTwiki - The Chatbot Wiki

In many contexts of data processing it happens that one wants to group units of a type. Clustering refers to an analysis of the data at hand in which a class is assigned to each data point. Data that are similar to each other are grouped together in a cluster. You can use clustering to automatically add new data to existing groups or to analyse existing data for grouping. For this, you do not need sample data that you have previously divided into predefined groups by hand. This is an unsupervised learning procedure.

Application for chatbots

In the context of chatbots, clustering is helpful for initial data analysis if historical data is available. For example, one can determine from the chat history which intents should be created. In the operation of a chatbot, collected sentences that have not met an intent can also be brought into a structure through clustering and new intents can thus be identified.

Functionality:
For clustering, one first needs a data representation. Normally, data are represented as number vectors, with individual dimensions of the vector reflecting properties of the data. In order to group these in a meaningful way, a measure of similarity is needed. In most cases, the Euclidean distance is used for this. [1] Depending on the algorithm, this metric and the way the data are assigned to the groups can vary.

Nearest Neighbour

The simplest way would be to randomly assign a class at the beginning of a certain number of data points, and then for all other points assume the class that your nearest neighbor has.

However, if this method is too inaccurate, it can be extended by considering the classes of several neighbors instead of just one, and choosing the class that occurs most frequently. [2]

Centroid-based processes

The results are even better if centroid-based methods are used. Here, a centre point is determined for each cluster (for example, the mean value of all points in a cluster) and this is used as the reference point for the assignment. At the beginning, these centroids can be set randomly. The distance to all centres is then calculated for the data in each case. The data point is then placed in the cluster to which it has the smallest distance. The centroid is then adjusted accordingly, because adding a point creates a new mean value. The centre moves with time. As soon as a convergence criterion is met (for example, if the changes in the centroids are too small), the algorithm stops. [3][4]

Text representation: Bag of Words

Text data can be represented in vectors in various ways. In simple use cases, for example, one can define a vocabulary that can be thought of as a table. Each word corresponds to an integer (like an ID). With the help of such a table, a sentence can now be converted into a vector. Each sentence corresponds to a vector where each dimension corresponds to a word of the vocabulary. For each word that occurs in the sentence, the dimension is given the value 1, all words that are not present remain at 0. [5]

Text Representation: Deep Learning Models 

For a representation that contains more semantic properties of the text, vectors are used that are created by Deep Learning methods. This type of method requires a lot of data. For example, recurrent neural networks (RNNs) can be used to train language models by always predicting the next word for a given word sequence. This works by converting the sequence to a vector in an encoder RN N and using a decoder RNN to translate the vector into the following word. If you now use only the encoder, you get a vector representation of the sentence that has significantly fewer dimensions than a bag-of-words approach and more semantic content.

> Back to BOTwiki - The Chatbot Wiki

Sources

[1] https://sites.google.com/a/erhard-rainer.com/erhard-rainer/mathematik/distanz-zwischen-zwei-punkten
[2] k-nearest neighbours, https://towardsdatascience.com/k-nearest-neighbours-introduction-to-machine-learning-algorithms-18e7ce3d802a
[3] https://www.youtube.com/watch?v=_aWzGGNrcic
[4] https://www-m9.ma.tum.de/material/felix-klein/clustering/Methoden/K-Means.php
[5] https://machinelearningmastery.com/gentle-introduction-bag-words-model/


BOTfriends Preview

Messenger Services

--> to the BOTwiki - The Chatbot Wiki

Digital communication has firmly established itself in our everyday lives. About 75% of all Germans use the services of WhatsApp. Almost one in two [1] currently uses Facebook. In the business environment, too, agreements and discussions take place to a large extent online.

In order to gain a better understanding of different target groups, we take a closer look at the best-known communication channels in both application areas:

WhatsApp

WhatsApp is currently the most popular messenger service on mobile devices in German-speaking countries and has made the use of SMS almost superfluous, especially among young people. This development can also be observed in many countries in South America, Africa and Asia. However, the service is not so popular in its own market (USA). 

  • Target group: overarching
  • Examples of use for chatbots: newsletters, customer service, making appointments, bookings, etc.
  • Platforms: Android, iOS, Web Browser, Windows Phone, Windows 10
  • Website: https://www.whatsapp.com/

WhatsApp notifications are active for almost all users. A direct customer contact can be established quickly and easily via a Business API.

 

Facebook Messenger

As an independent application, the Facebook Messenger is virtually necessary to write messages about Facebook from the smartphone. The majority of Facebook users therefore use Messenger. In addition to the classic chat functions, interaction with bots through Quick Replies is easily possible.

  • Target group: overarching
  • Application examples for chatbots: news, FAQ, recruiting, consulting, customer service etc.
  • Platforms: Android, iOS, Web Browser, Windows Phone, Windows 10
  • Website: https://www.facebook.com/messenger/

Young people are rapidly disappearing from the platform, but older people are discovering the network for themselves. Users are well connected with each other, both within the inner circle and internationally. Chatbots can be integrated in a largely uncomplicated way.

 

telegram

Safety is the top priority for the Telegram messenger service. The Messenger is, thanks to a huge sum of investments, free of costs and advertising, cloud-based and runs on open-source software. 

  • Target group: overarching
  • Examples of use for chatbots: newsletters, customer service, making appointments, bookings, events, etc.
  • Platforms: Android, iOS, Windows Phone, Firefox OS, Ubuntu Touch, Windows, macOS, Linux
  • Website: https://telegram.org/

Telegram is becoming more and more popular. "Fridays For Future" demonstrators use the Messenger to organize themselves, to pass on their live location and to network. Bots are easy to create and have a lot of features available.

 

WeChat

In addition to standard messenger functions (partly only in China), WeChat also offers the ability to order food, pay bills, search for jobs, arrange appointments with doctors, play games and much more. In the meantime, it has also been expanded to include the mobile payment system "WeChat Pay". WeChat forwards data to Chinese authorities [3].

  • Target group: mainly China; overarching
  • Application examples for chatbots: orders, events, customer support, newsletters etc.
  • Platforms: Android, iOS, Windows Phone, Blackberry OS, Windows, macOS
  • Website: https://www.wechat.com/

In the People's Republic of China, WeChat has already become the center for numerous online activities. Strong networking with Chinese authorities makes the platform practically essential for every citizen. Censorships take place. The platform is also attracting new users outside the country. Chatbots are relatively easy to implement.

 

viber

With Viber, messages can be sent and IP phone calls can be made. Calls between Viber users are free of charge, outgoing calls to telephone networks are possible, but subject to a charge (pre-paid model). With regard to data protection, Viber was often subject to strong criticism in the past [2]. The Japanese company Rakuten took over the company in 2014.

  • Target group: overarching
  • Application examples for chatbots: newsletters, messages, customer support etc.
  • Platforms: Android, iOS, Windows Phone, Win 10 Mobile, Windows, macOS, Linux
  • Website: https://www.viber.com/

In order to correctly implement chatbots on the platform, a monthly fee may be charged.

 

kik

Kik is very popular with young people (in the USA). This is partly due to the function to hide messages (from the parents) and to download extensions directly in the app. Chats are possible anonymously without any limitations and without giving the mobile phone number. This is heavily criticised by various experts, especially in view of the young target group.

  • Target group: 13-24 years, mainly in the USA
  • Examples of use for chatbots: storytelling, newsletters, messages, promos etc.
  • Platforms: Android, iOS, Blackberry OS (5, 6, 7) Nokia Series 40, Windows 10 Mobile
  • Website: https://www.kik.com/

An interesting use of chatbots on Kik is certainly "Koko". The chatbot offers "emotional support" for users and has already reached more than 200,000 people [4].

 

line

While problems arose in the Japanese telephone network, Line became popular. News, video and voice calls are free. Similar to Facebook, there is a timeline. Unlike WhatsApp, contacts are not automatically added. So it is possible to better control your conversations and data.

  • Target group: mainly Asia; overarching
  • Examples of use for chatbots: storytelling, newsletters, messages, promos etc.
  • Platforms: Android, iOS, Blackberry OS (5, 6, 7) Nokia Series 40, Windows 10 Mobile
  • Website: https://line.me/

Line offers a free Bot Designer to start with, a connection for more complex bots is possible through APIs.

 

slack

With Slack, group, channel or individual chats are possible. The name is an acronym and stands for "Searchable Log of All Conversation and Knowledge".. Due to a cooperation with Google, a Google Drive bot can be integrated, for example, which posts comments and requests for access to Drive documents in Slack. Use without archive access is free of charge.

  • Target group: Business users
  • Application examples for chatbots: IT support, appointment coordination, employee support, etc.
  • Platforms: Windows, macOS, Linux, Apple iOS, Android, Microsoft Windows Phone
  • Website: https://slack.com

The use of chatbots on slack is strongly limited to business contexts and can accelerate or facilitate work processes. 

 

Microsoft teams

Microsoft Teams is integrated into the 365 Office suite and allows chats, meetings, notes and attachments to be combined. The platform offers the possibility to integrate extensions from third parties. 

  • Target group: Business users
  • Application examples for chatbots: IT support, appointment coordination, employee support, learning assistance, etc.
  • Platforms: Windows, macOS, iOS, Android
  • Website: https://teams.microsoft.com/

Similar to Slack, Microsoft teams focus on business use. However, the use of a chatbot in learning scenarios is also interesting, as teams are used in Microsoft for Education.

 

Google Hangouts

News, video and voice calls are possible via Google Handouts. In the past, the service was also used for private conversations, but at the latest since the introduction of the G-Suite, its use in companies has clearly predominated.

  • Target group: Business users
  • Application examples for chatbots: management, setup and configuration, order generation, search, data collection
  • Platforms: Web application, Android, iOS
  • Website: https://hangouts.google.com

Chatbots make sense for hangouts mainly when working with the G-Suite. Integration is possible through developer interfaces [5].

 

 

> Back to BOTwiki - The Chatbot Wiki

Sources

https://cai.tools.sap/docs/concepts/channel

https://app.smooch.io/integrations/categories/customer-channels

https://de.statista.com/infografik/16855/anteil-der-deutschen-die-soziale-medien-taeglich-nutzen/ [1]

https://de.statista.com/prognosen/999735/umfrage-in-deutschland-zu-beliebten-messengern

https://www.zeit.de/2012/09/Telefonsoftware-Viber/komplettansicht [2]

https://www.moneycontrol.com/news/business/companies/wechat-confirms-that-it-makes-all-private-user-data-available-to-the-chinese-government-2391847.html [3]

https://www.kik.com/casestudy/koko/ [4]

https://developers.google.com/hangouts/chat/concepts/bots [5]


BOTfriends Preview

Channel connector

--> to the BOTwiki - The Chatbot Wiki

During the development of a chatbot application one often encounters problems with the handling of data formats of different channels. As soon as the application is to be accessible from several channels, it must bring the messages to a unique format. If this is not done, source code duplicates may occur.

Description of backend and channel connector architecture

A solution for this would be so-called Channel Connectors. They know the formats of several channels and convert the data of these channels to one format. The formatting does not have to be done by the Chatbot application anymore. An example of a connector is Smooch (the top connector in the figure). Smooch knows the data formats of the channels Slack, Facebook, WhatsApp, Telegram, Twitter and more, bundles them and brings them to a self-defined scheme. [1]

In order to illustrate the basic concept more clearly, the data formats of Facebook and Slack are compared with each other.

Facebook: [2] Slack: [3]

Facebook data format

Slack data format

 

It is noticeable that the message "This is a text message" can be reached differently in the Facebook data set than in the Slack data set. Therefore, algorithms must be written that map these formats to a common schema. With this, the message can then always be addressed in the same way. Channel connectors take over this role and thus save chatbot developers implementation effort.

> Back to BOTwiki - The Chatbot Wiki

Sources

[1] Smooch https://smooch.io/
[2] Facebook, Developer Docs https://developers.facebook.com/docs/
[3] Slack, Block Kit Builder https://api.slack.com/tools/block-kit-builder


BOTfriends Preview

On Premise Chatbots

--> to the BOTwiki - The Chatbot Wiki

Chatbots that are able to work independently of external services are considered on premise chatbots. On Premise can therefore be seen as the counterpart to a cloud. [1]

This approach ensures that conversations of the bot do not reach third-party providers. It follows, however, that services for the artificial intelligence of a bot can no longer be obtained from cloud providers such as Google Dialogflow. Natural language understanding must therefore either be developed in-house or rely on open source and on premise solutions. Examples would be RASA, ana.chat or botpress. [2,3]

Another approach is the hybrid cloud. Here, cloud components are mixed with on premise solutions. [4] This ensures control over conversations and, at the same time, complex services such as Dialogflow for Natural Language Processing can be obtained from the cloud. [5]

> Back to BOTwiki - The Chatbot Wiki

Sources

[1] Seo-United, What is On Premise? [https://www.seo-united.de/glossar/on-premises/
[2] ana.chat [https://www.ana.chat/
[3] botpress [5] https://botpress.io/
[4] NetApp, What is a hybrid cloud? https://www.netapp.com/de/info/what-is-hybrid-cloud.aspx
[5] DialogFlow https://dialogflow.com/


BOTfriends Preview

Happy Path

--> to the BOTwiki - The Chatbot Wiki

A happy path is an expected outcome of a conversation and, above all, the conversation paths that are most frequently taken by the user . These happy paths are created, among other things, within the Conversational Map or the Conversation Flows. The counterpart to Happy Paths are Edge Cases represent. Here, you highlight outcomes of a conversation that are not expected, that rarely occur and therefore represent exceptions in the conversation.

Example for the Happy Path on the Use Case "Order Pizza

This example shows what a "happy" conversation between user and chatbot can look like when ordering a pizza. All information that the user provides to the chatbot can be processed and no misunderstandings arise.

Example for the Happy Path

Example for the Edge Case at the Use Case "Order Pizza

This example shows that there can also be great potential for error if the user sends answers that the chatbot cannot process. The graphic below shows that the user enters an address that is outside of Germany. In this case, no delivery can take place. Such edge cases should be considered in advance and mapped in the conversational map. You should ask yourself how to deal with the user in such situations. For example, you can inform the user that you only deliver within Germany or you can give them the option to enter the address again in case of a misunderstanding.

Example of Edge Cases in Conversations

> Back to BOTwiki - The Chatbot Wiki

 


BOTfriends Preview

Conversational Design

--> to the BOTwiki - The Chatbot Wiki

Conversational design is one of the most important parts of the chatbot development process. It is the cornerstone of a good chatbot user experience. This phase takes place before the actual technical development. The following aspects are examined in more detail:

Use Case Definition

Chatbots can be used everywhere where communication takes place. Therefore, it is important in conversational design to identify the exact problems that can be solved with chatbots in order to create clear added value. In this conception phase, the goals that the chatbot should fulfil are also worked out. Then, as in classic development, user stories are created that contain the functions of the chatbot.

"If chatbots can convince your customers that they're human, but can't resolve their issues, what are you really accomplishing." Kevin McMahon - Director of mobile development, SPR Consulting

Target group definition

Many decisions in the conception phase depend on the actual users of the chatbot. In order to identify the exact target group of the chatbot, so-called personas, i.e. archetypal users, are developed. These represent the user groups of the chatbot. As a rule, very different personas are created in order to get a good picture of the user group. When creating a persona, characteristics such as name, age, place of residence, education or their level of digitalisation are defined. Most important are the needs of the target group, which the chatbot should address.

Chatbot personality and tonality

The chatbot is seen as a representative of the company, which it represents in conversations with users. The value system and the tone of the company should also be reflected in the language of the chatbot. Therefore, a detailed personality or character is attributed to the chatbot, with a fixed value system. This is necessary to maintain a tonewhen formulating the chatbot's responses.

> Conversational Map

> Conversational Testing

> Back to BOTwiki - The Chatbot Wiki


BOTfriends Preview

Chatbot Controller

--> to the BOTwiki - The Chatbot Wiki

A chatbot controller is the heart of a Chatbots and is used to create, configure and manage a chatbot and to integrate various systems and services. However, the term chatbot controller is not uniformly defined. Some of the functions of chatbot controllers are also covered by the so-called conversational AI platforms.

architecture

The following architecture of the company BOTfriends shows how a chatbot controller can relate to other systems. The controller is located in the centre of the illustration.

Architecture of a controller

The chatbot controller enables communication with the connector, NLP service, analytics tool and includes other functions. Furthermore, the controller offers the possibility to connect additional systems. A component for the chatbot logic is also included.

Connected systems and services 

In the following, the systems and services that are linked to the Chatbot Controller are explained:

  • Admin Interface

The Admin Interface is an interface with which various parameters of the controller can be configured. Among other things, it is possible to create user accounts and manage projects.

  • NLP Service

An NLP service enables natural language processing and thus the processing and output of natural language. On the one hand, the intention or the request of the user is determined from the natural language entered and, depending on the chatbot logic, the appropriate answer is output.

  • Channels

This includes all channels through which the input is made by the user and the corresponding output of the chatbot is displayed. Exemplary channels would be the Facebook Messenger or a website chat.

  • connector

The Connector's task is to translate the various protocols in which conversations are output by the different channels. After interpretation by the chatbot, the conversation is transferred back to the connector in a uniform format and translated accordingly for the respective channels.

  • Analytics

Furthermore, it is possible to integrate so-called analytics tools into a chatbot. These make it possible to analyse and optimise conversation data.

  • Additional Features

Depending on the use case of the chatbot and partly also depending on the industry in which the chatbot is used, it sometimes makes sense to connect functions such as multilingualism and other systems such as ERPs(Enterprise Resource Planning) and CRMs(Customer Relationship Management) to the chatbot.

> Back to BOTwiki - The Chatbot Wiki

 


BOTfriends Preview

Guided Communication

--> to the BOTwiki - The Chatbot Wiki

Guided communication is a set-up style of a chatbot. There are 2 ways for chatbots to communicate. One is guided communication, where one can navigate exclusively via buttons, and the other is free text input, where users interact with the chatbot by typing in natural sentences. As the name suggests, in the first case the user is guided through the chatbot's content with the help of buttons and thus only has the option of clicking to access certain content.

Quick Replies

What are the advantages and disadvantages of guided communication?

Clear advantages of guided communication are quite simple. The user can only see the content that has been developed. This makes it very easy to quickly develop a first chatbot and bring it to market. It avoids the difficulty of recognising natural language by following a rule-based approach. Another advantage is that the user cannot be disappointed because he does not get an answer to his question, but the user knows that the chatbot can only answer what is also accessible via buttons. In addition, communication can be accelerated if only buttons have to be clicked instead of typing in entire sentences. In this way, the user reaches the goal more quickly.

A resulting disadvantage is the following: Through the rules-based approach, one loses a lot of technology and the advantages of open natural communication. Users feel most comfortable when they can communicate in a natural way, as they do in their everyday lives. Another disadvantage of purely guided communication is that complex chatbot use cases cannot be mapped because the interaction options are very limited.

How is guided communication used?

Guided communication should always be integrated in combination with free text input. This allows the advantages of guided communication to be exploited and avoids the disadvantages of free text communication. Furthermore, it is very good to work with buttons to give the user a framework of what content can be answered by the chatbot.

> Back to BOTwiki - The Chatbot Wiki