Chatbots 101

Brighton Web Dev Meetup - Alex Nicol @nicol_alexandre - #RiseOfTheBots
bot2018.webnicol.fr

Me

Alex Nicol - @nicol_alexandre - Github
Developer @ Digital Innovation team // EDF Energy R&D UK Centre
Web / Mobile / AR / Chatbots / Blockchain

What is a chatbot?

Chatbot: An automated computer program that mimics human behaviour in a conversation (text or voice), often by using natural language processing.

bots

Why now?

NLP (AI in general) has never been so cheap and accessible

More than 50% of website traffic is on mobile

People install less and less mobile applications

But there is more and more messaging applications

Virtual assistant everywhere!

https://www.statista.com/statistics/277125/share-of-website-traffic-coming-from-mobile-devices/
https://www.comscore.com/Insights/Presentations-and-Whitepapers/2017/The-Global-Mobile-Report

The internet is always evolving

Browser + Website

Smartphone OS + Mobile app

Messaging platform + Chatbots

Advantages

Asynchronous conversation

Multidevice

Excellent to do simple repetitive task quickly

Minimalist UI

24/7 Availability

No queues

Challenges

Platform specific design (voice != text, slack != facebook)

Users expectations are high

Failing gracefully

Discovery

Conversational UX is hard new

Natural Language Processing

"NLP is a way for computers to analyze, understand, and derive meaning from human language in a smart and useful way."

http://blog.algorithmia.com/introduction-natural-language-processing-nlp/

The are not new

The first one: Eliza

bots

HANDS ON!

Let's create a Cinema Bot!

Toolbox:

JavaScript / Node.js basic knowledge

AWS Lambda + Serverless (or a server if you prefer)

Dialogflow

Facebook Messenger

Facebook Messenger Bot API

  • • Text
    • Audio
    • Image
    • Video
    • File
  • Templates:
    • List
    • Receipt
    • Button
    • Airline
  • Buttons:
    • Url
    • Call
    • Buy
    • Share
  • • Webview
    • Instant article
    • Log In/Out (OAuth2)
    • Quick replies
    • Menu
https://developers.facebook.com/docs/messenger-platform

Facebook

Create a page

Create an messenger app

https://www.facebook.com/pages/create/
https://developers.facebook.com

0. Link your facebook app to your server

1. Hello World

bots

1. Hello World

2. Small Talk

bots

2. Small Talk

3. Get a list of movies (and use entities)

bots bots bots

3. Get a list of movies (and use entities)

">

4. Use Contexts and Postback

bots

4. Use Contexts and Postback

5. Prompts

bots

5. Prompts

6. Bonus: Event, follow ups and quick reply

bots bots bots

6. Bonus: Event, follow ups and quick reply

Reminders

• Choose your platform
• Let your users know they're talking to a bot
• Handle errors, let your users know if it fails
• If needed, handover the query
• Create a character for your bot, but don't give them multiple personalities
• Keep it simple
• Listen to your users
• Not everything canshould be bot-ed

Thank you