The beginning of a new chat-bots ecosystem. Execute
custom code on the server. AWS Lambda, QuickBlox
Cloud Code.
Kharkiv Cloud Buzz #4, 23 Apr 2016 Igor Khomenko @ QuickBlox
CHAT BOTS ARE
NEW APPS
QUICKBLOX
➤ Cloud communication backend - API/SDK/infrastructure to
build own WhatsApp
➤ Platform provides
- chat using XMPP protocol,
- WebRTC signalling for video/voice calling,
- API for sending push notifications
- user management system
- data storage and more
➤ Hosted in the cloud (AWS)
SUMMARY
➤ Chat Bots: overview
➤ A taxonomy of models/techniques that are used to build
conversational agents: Retrieval-Based vs. Generative
➤ How do Chat bots platform works: Facebook Messenger,
Microsoft Skype, Telegram, Slack
➤ Hosting for bots
➤ AWS Lambda as a hosting for bots
➤ CloudCode architecture
CHAT BOTS
OVERVIEW
Chat Bot - a computer program that simulates human conversation, or
chat, through artificial intelligence(?). Typically, a chat bot will
communicate with a real person.
DEFINITION
• How do Chat Bots make our life easier?
• Why they become so popular nowadays?
ASK YOURSELF
HOW DO CHAT BOTS MAKE OUR LIFE
EASIER
“Chat bots aim to make life simpler for its users. Learning
from user behaviour & preferences, chat bots should be
capable of understanding your needs.
Imagine ordering pizza, booking a cab, getting flight
status, reading news, getting stock updates, all within
just one platform? It can save so much space on your
mobile phone, simple UI on a messaging platform which
you already like (one platform, many services).”
WHY THEY BECOME SO POPULAR
NOWADAYS
• Natural: humans always liked interaction that is:
1) instant; 2) natural.
• Accessible: chat apps have billions of users, you’re likely
using one of them on daily basis. New home for chat bots:
Facebook Messenger, Microsoft Skype, Slack, Telegram,
LINE, Kik.
• Light-weight: having to download another app with custom
UI for every pizza shop is not what users want, apparently.
Engaging a bot is as simple as messaging someone or
adding a contact into a group chat.
PARADIGM SHIFT
Messaging = new OS
Bots = new apps
Mobile Apps (2007-2016) -> Messaging OS (2016-…)
LEARNING
TECHNIQUES
•Retrieval-Based model
•Generative models
A TAXONOMY OF MODELS
RETRIEVAL-BASED MODEL
• Use a repository of predefined responses to pick
an appropriate response based on the input and
context.
• These systems don’t generate any new text, they
just pick a response from a fixed set
RETRIEVAL-BASED MODEL: EXAMPLE
GENERATIVE MODEL
• Don’t rely on pre-defined responses. They
generate new responses from scratch
• Based on Machine Translation techniques
https://api.ai
https://wit.ai
https://www.luis.ai/
A TAXONOMY OF MODELS
• Retrieval-based models (easier) vs Generative
models (harder)
• Short-Text Conversations (easier) vs long
conversations (harder)
• Open domain (harder) vs closed domain (easier)
DEMO
https://www.messenger.com/t/hiponcho
HOW DO CHAT
BOTS
PLATFORMS
WORK
HOW TO BUILD A CHAT BOT
• a computer program (no UI)
• need home (hosting)
• blackbox, has API to receive messages (usually via
HTTP web-hooks, rarely - real-time socket
connection)
• use API to send replies
• Bots Stores to discover bots or via web link
HOW TO BUILD A CHAT BOT
CHAT BOTS
HOSTING
HOSTING
1.Virtual server + Web framework
2.Container services:
• AWS Lambda + API Gateway
• Microsoft Azure WebJobs
• Google Cloud (Task Queue)
• Heroku
3.Hosting platforms for bots:
• beepboophq
AWS LAMBDA
AWS Lambda is a compute service where you can upload your code
to AWS Lambda and the service can run the code on your behalf
using AWS infrastructure.
Cloud Code
AWS LAMBDA
DE
MO
CLOUD CODE
LINKS
• Once-in-a-decade paradigm shift: Messaging
https://medium.com/@beerud/once-in-a-decade-paradigm-shift-
messaging-dec665593e49#.7nsjkawml
• AI engines for chat bots: https://api.ai, https://wit.ai, https://www.luis.ai
• How do Chat Bots platforms work: technical overview of Microsoft
Skype, Slack, Facebook Messenger and Telegram bots
https://medium.com/@igorkhomenko/how-do-chat-bots-platforms-work-
technical-overview-of-microsoft-skype-slack-facebook-messenger-
4f3076cee04d#.v4mrlbyv4
• Chat bots deep learning http://www.wildml.com/2016/04/deep-
learning-for-chatbots-part-1-introduction
igor@quickblox.com

Chat bots are new apps

  • 1.
    The beginning ofa new chat-bots ecosystem. Execute custom code on the server. AWS Lambda, QuickBlox Cloud Code. Kharkiv Cloud Buzz #4, 23 Apr 2016 Igor Khomenko @ QuickBlox CHAT BOTS ARE NEW APPS
  • 2.
    QUICKBLOX ➤ Cloud communicationbackend - API/SDK/infrastructure to build own WhatsApp ➤ Platform provides - chat using XMPP protocol, - WebRTC signalling for video/voice calling, - API for sending push notifications - user management system - data storage and more ➤ Hosted in the cloud (AWS)
  • 3.
    SUMMARY ➤ Chat Bots:overview ➤ A taxonomy of models/techniques that are used to build conversational agents: Retrieval-Based vs. Generative ➤ How do Chat bots platform works: Facebook Messenger, Microsoft Skype, Telegram, Slack ➤ Hosting for bots ➤ AWS Lambda as a hosting for bots ➤ CloudCode architecture
  • 4.
  • 5.
    Chat Bot -a computer program that simulates human conversation, or chat, through artificial intelligence(?). Typically, a chat bot will communicate with a real person. DEFINITION
  • 6.
    • How doChat Bots make our life easier? • Why they become so popular nowadays? ASK YOURSELF
  • 7.
    HOW DO CHATBOTS MAKE OUR LIFE EASIER “Chat bots aim to make life simpler for its users. Learning from user behaviour & preferences, chat bots should be capable of understanding your needs. Imagine ordering pizza, booking a cab, getting flight status, reading news, getting stock updates, all within just one platform? It can save so much space on your mobile phone, simple UI on a messaging platform which you already like (one platform, many services).”
  • 8.
    WHY THEY BECOMESO POPULAR NOWADAYS • Natural: humans always liked interaction that is: 1) instant; 2) natural. • Accessible: chat apps have billions of users, you’re likely using one of them on daily basis. New home for chat bots: Facebook Messenger, Microsoft Skype, Slack, Telegram, LINE, Kik. • Light-weight: having to download another app with custom UI for every pizza shop is not what users want, apparently. Engaging a bot is as simple as messaging someone or adding a contact into a group chat.
  • 9.
    PARADIGM SHIFT Messaging =new OS Bots = new apps Mobile Apps (2007-2016) -> Messaging OS (2016-…)
  • 10.
  • 11.
  • 12.
    RETRIEVAL-BASED MODEL • Usea repository of predefined responses to pick an appropriate response based on the input and context. • These systems don’t generate any new text, they just pick a response from a fixed set
  • 13.
  • 14.
    GENERATIVE MODEL • Don’trely on pre-defined responses. They generate new responses from scratch • Based on Machine Translation techniques https://api.ai https://wit.ai https://www.luis.ai/
  • 15.
    A TAXONOMY OFMODELS • Retrieval-based models (easier) vs Generative models (harder) • Short-Text Conversations (easier) vs long conversations (harder) • Open domain (harder) vs closed domain (easier)
  • 16.
  • 17.
  • 18.
    HOW TO BUILDA CHAT BOT • a computer program (no UI) • need home (hosting) • blackbox, has API to receive messages (usually via HTTP web-hooks, rarely - real-time socket connection) • use API to send replies • Bots Stores to discover bots or via web link
  • 19.
    HOW TO BUILDA CHAT BOT
  • 20.
  • 21.
    HOSTING 1.Virtual server +Web framework 2.Container services: • AWS Lambda + API Gateway • Microsoft Azure WebJobs • Google Cloud (Task Queue) • Heroku 3.Hosting platforms for bots: • beepboophq
  • 22.
    AWS LAMBDA AWS Lambdais a compute service where you can upload your code to AWS Lambda and the service can run the code on your behalf using AWS infrastructure. Cloud Code
  • 23.
  • 24.
  • 26.
    LINKS • Once-in-a-decade paradigmshift: Messaging https://medium.com/@beerud/once-in-a-decade-paradigm-shift- messaging-dec665593e49#.7nsjkawml • AI engines for chat bots: https://api.ai, https://wit.ai, https://www.luis.ai • How do Chat Bots platforms work: technical overview of Microsoft Skype, Slack, Facebook Messenger and Telegram bots https://medium.com/@igorkhomenko/how-do-chat-bots-platforms-work- technical-overview-of-microsoft-skype-slack-facebook-messenger- 4f3076cee04d#.v4mrlbyv4 • Chat bots deep learning http://www.wildml.com/2016/04/deep- learning-for-chatbots-part-1-introduction
  • 27.