25. 24.3.
24.3. CodeMotion @electrobabe
Chatbot Development
●
Rule based vs. Machine Learning
●
Character vs. Service Bot
●
Specific vs. General
●
Text vs. Speech
●
Standalone vs. Group chat / Inline
●
Different Platforms
30. 24.3.
24.3. CodeMotion @electrobabe
Key Learnings <3
●
Be positive, be funny, be unique
●
Respond to all types of input
●
Learn and adapt continuously
●
Use analysis tools
●
Respond to rude behavior
31. 24.3.
24.3. CodeMotion @electrobabe
Key Learnings (cont.)
●
No common standards! (yet)
●
Add Easter Eggs
●
NEVER pretend to be a human
●
Be very careful how often, when and how
to notify users
Hi guys!
My name is Dr. Barbara Ondrisek and today I&apos;m going to give a talk about my experience developing cross-platform chatbots. I created one of the very first chatbots on Facebook – and definitely Austria’s first Facebook Messenger and Skype chat bot.
About me: I’ve made my PhD at the University of Technology Vienna – and been working as a consultant and freelancer for more than 15 years for different mostly big companies mostly as a Backend developer on web projects (most recently for George / Erste Bank).
I have a strong Backend dev background and in the last couple of years I’ve been working as a Senior Backend developer with a disposedness to full stack and mobile.
I also love to play around with other technologies and as Facebook announced on their F8 conference mid of April last year to open up their Messenger platform to bots I was eager to try their API!
So I created one of the very first chatbots on Facebook – and definitely Austria’s first Facebook Messenger and Skype chat bot: Mica, the Hipster Cat Bot.
What are chatbots?
Oxford dict &quot;bot&quot;: &quot;An autonomous program on a network which interacts with systems or users&quot;
A chatbot is a service that enables you to interact with a service or company through a conversational interface. So it is a interactive program embedded in a program, the messenger app.
Bots are also referred to as “virtual assistants”, “virtual agents”, “conversational UI” or “conversational commerce”. Or “Conversation as a Service”.
The idea (and opportunity) behind chatbots is that there is no huge barrier to use it in contrast to apps, which have to be installed separately.
You’d need a phone with an app store, also have to remember your password in order to install an app, need to have free space on the device and a good connection to download it etc. - only to mention some of the obstacles getting your app delivered to the user. In contrast to that 1 billion people worldwide are already using Facebook Messenger (and 300 million use Skype) and now with a chat bot I can reach all of them easily on a platform they already know.
Chatbots are not a super new thing!
Historically speaking the very first chatbot was developed at the MIT AI Lab by the computer scientist Joseph Weizenbaum in the mid–1960s. This bot, ELIZA, simulated a Rogerian psychiatrist and Weizenbaum wanted to find out with this project, how natural language can be used in human-computer-interfaces. ELIZA was programmed to analyze the input of key words and to respond with a number of canned phrases containing therapeutic language.
Also the first computers where designed in this manner: A question-answer system.
And there were also text based computer games in the 80s such as Zork.
Why now?
Microsoft announced end of March at their BUILD conference the bot-support on Skype.
Two weeks later Facebook announced at their F8 conference that they finally opened their messenger API for bots and the first bots started to be approved by Facebook. Only a few days later , a Facebook Messenger weather bot, raised 2M of funding.
Further Google presented at their Google I/O (mid May) another innovative chat platform Allo that also should support NLP. Further they announced in mid July their Cloud Natural Language API as a Natural Language Processing (NLP) and Machine Learning framework.
IBM also released their NLP framework Watson. Facebook bought Wit.ai, Google bought api.ai, a machine learning framework. Amazon / Alexa has angel.ai. Microsoft started Bot Framework and LUIS (short for “Language Understanding Intelligent Services”), a machine learning framework.
So all of the big players in the field are pushing the topic.
(c) Benjamin Keyser
Why are we doing this?
1 minute of 3 online spent minutes is spent mobile, but we see that the usage of numbers of apps is dropping (80% of time is spent in only 3 different apps), but not messenger apps!
The current app trend is to go away from social media to messengers.
This graph is already outdated, ...
Statistics show, that messaging apps are used more frequently than Social Media Apps.
This grafic shows that more people use FB Messenger than Facebook for Status-Posts. Direct communication is used more frequently than posting, where you don’t know who exactly is reading it.
One in three online spent minutes are spent on mobile phones, but in total numbers the usage of apps is dropping. People don’t download new apps anymore. 65% don’t download new apps anymore!
80% der Zeit am Handy verbringt man genau in 3 Apps, in manchen Ländern bis zu einer Stunde durchschnittlich am Tag!
WhatsApp: 1 Billion monatlich aktive User (MAU)
Facebook Messenger: 1 Billon
QQ („ICQ“ China): 900 MAU
WeChat („WhatsApp“ in China): 800 MAU
Viber: &gt;300 million monthly active users (&gt;800 total)
Twitter: 310 MAU
Skype: 300 MAU
Line App (Asien) : 220 MAU
Telegram: 100 MAU
Kik (USA): 300 Millionen reg User (total)
Slack: 4 Millionen täglich aktive User
HipChat, Cisco Spark, Microsoft Teams...
iMessage (Apple): 250 mio users
Kakao: 160 mio
BBM: 100 mio MAU
VKontakte, Discord, SMS...
(c) david pichsenmeister
Different messenger platforms are used in different countries.
Kik for instance is super popular in the US (especially for teenages), Viber is very popular in Slavik countries, Central Eastern Europe and South East Asia, Line is popular in Asian countries. So if you decide to launch a bot in a certain region take this regional differences in account.
The advantage of chatbots is that you attract the users where they usually are: In messenger apps. Not download or install of apps is needed, you can present your company on a channel where all these people spend their time!
However, messengers are widely used, but what about China?
The same is already happening in China with WeChat and QQ, where people integrate the messenger app far more in their intimate personal life through micro-payments to friends, or paying their electronic bills or rents in WeChat.
WeChat pay offers a lot of different services and became a single medium for all transactions — and Messenger wants to become this for the West.
However, after Facebook announced to open up their Messenger platform to bots I was eager to try their API and started to develop Mica, the Hipster Cat Bot, which started as a chatbot for Facebook Messenger and Skype, that helps you discover the best places near by.
Mica started as a spin-off of LIKE A HIPSTER, an app that shows you trendy places.
This is the Facebook Messenger implementation - We designed her personality like this:
She is a cat and a bot. She likes funny cat pictures and milk, but doesn&apos;t like water. She also enjoys hanging out in hip coffee shops and knows the the best places worldwide.
The internet loves cats ... so I created Mica, the Hipster Cat Bot as fictional character and my chatbot got a face. First I thought I use my cat&apos;s face as fb page icon, but than I thought an abstraction would fit better.
So, why only stay with one platform? There are so many such as Kik, Line App, Telegram… and so I thought I implement it on Skype!
Microsoft announced end of March – two weeks earlier than Facebook - at their BUILD conference the bot-support on Skype. Facebook Messenger has 1 billion unique users per month, but Skype still has 300 mio!
... and so I decided to implement it on Skype!
Skype implementation is missing some features. Meanwhile there are structured messages (buttons), carousel lists, but still no animated content (gifs, videos)...
Here you see a list of Austrian homemade commercial chatbots:
- Mica, of cause, venue recommendation service, restaurants or coffeeshops
- Austrian Airlines: service bot
- Swelly: Helps you with A/B decision making
- Mr. Hokify: Jobsearch bot
- Record bird: music recommendation bot
- Sophie from Mon Style: shopping assistant
- ZoomBot from Zoomsquare: Real estate seach engine
- Yodel: Telephone service bot for Slack
Successful non-commercial bots are:
- Meme Generator Bot by David Pichsenmeister
- Toni: Football games bot by Klemens
- Nela: Language Trainer by Liechteneckers
- Artemis: Machine Learning by Lemmings.io
To implement a bot for Facebook Messenger or Skype you simply have to implement a Webhook that can be written in any language you want. I chose Java because I like the object oriented language most.
In Java you have to write DTOs to handle the different REST resp. Json objects.
The backend is hosted on AWS EC2 and uses also a simple MySQL database to store basic data about the user such as the user’s name or last city.
- Mica on Facebook, on Product Hunt
- Mica on Skype, on Product Hunt
- Mica on WeChat
- Mica on Telegram, on Product Hunt
- Mica on Kik
developing the character, learnings, personality far more important than thought
Different platforms have different properties and features.
Challenge
My key learnings running and maintaining Mica are:
- Be positive, be funny, be unique! Create a unique personality people want to have a chat with. “Conversation can also bring connection and joy, and laughter is one of the most fundamental mechanisms for making people feel comfortable and creating positive associations and memories.”
- Respond to all types of input! Users tend so send emoji, stickers, sometimes images and audio files (wtf) – Mica also uses all kind of types from gifs to audio file of a purring cat.
- Learn and adapt continuously according to the users’ input and reaction! Chatbots are new and users try to find the limits and boundaries of chatbots
- Use analysis tools! We use – in addition to the tracking tools of the platforms – Google Analytics and a self-build tool
- Respond to rude behavior! With Mica, the Hipster Cat Bot we use a bad word dictionary. Users try and you have to respond accordingly. Poncho for instance stops to respond to you until you apologize.
- No common standards! (yet) Respond at least to generic requests like “hi”, “how are you?”, “help”
- Add Easter Eggs! Users love it when they find Easter Eggs. – additional entertaining.
- NEVER pretend to be a human. People get irritated easily when they don’t know who they are talking to or how the conversation partner is listening. Same also concerns a human takeover strategy.
- Define a clear aim. When you’re Google, Amazon or Apple you can release a chatbot that does everything. Otherwise stick to a clear use case and character.
- Be very careful how often, when and how to notify users! Retention (and discovery) is a problem with chatbots (as for websites and apps), so be careful not to spam your precious users
I founded the Chatbots Agency, the first agency for chatbots with (paying!) international customers.
Any questions?