Rise of the Bots

by Rafael Casuso

WHO IS @RAFAEL_CASUSO ?

Who is @Rafael_Casuso

  • Lead Front-End Engineer en StayApp

  • SnowStorm CEO and Co-Founder

  • Merlin Creator

  • Fullstack Senior Developer

  • Software Architect

  • JavaScript enthusiast

WHAT IS A BOT?

What is a Bot?

  • A Bot is an artificial intelligence with a human-like interface

  • A Conversational Bot simulates a conversation through programmatic responses

  • It is basically an application (or a sum of connected applications) that you can converse with 

  • Next big interface after Graphic, Mouse and Touch is Conversations (none is exclusive)

  • It usually runs on a messaging platform, external or custom, or is integrated into the OS

  • Famous bots (a type called Digital Assistants) include Siri, Cortana or Alexa

THE INTERFACE WAR

The Interface War

  • There is an ongoing War of Interfaces, driven by UX, with user adoption as the main goal

  • Conversation is the most natural interface for a human being

  • When Conversation is the Interface, Bot Personality is the UX

  • Different interfaces can be combined, graphical and conversational for example, as needed

  • There is also an ongoing Quest for the Lowest Friction

  • Bots on Messaging Platforms dodge the need for another app installation, thus reducing friction dramatically

BOT TYPES

Bot Types

  • There are endless possibilities for applications using conversational interfaces, both text and voice 

  • Internet of Things Device Manager: command-oriented

  • Customer Service: support and suggestions

  • Digital Assistant: hub for connected services, reservations, shopping

  • Advertisement: brand ambassadors, characters, friendly offers

  • Healthcare: medical appointments, diagnosis helper

  • Fintech: bank agent, financial advisor

  • Education: digital teachers, virtual tutors, examinators

BOT INTELLIGENCE

Bot Intelligence

  • Rise of the Bots have come with the perfect storm: the emergence of AI, online services and the digital consumer

  • Conversational Accuracy is its UX success measure 

  • Simple Bots are applications that perform actions in response to keywords, exact phrases or predefined choices

  • Intelligent Bots can use Cognitive Services with Machine Learning

  • Natural Language Processing (NLP) is the most important cognitive process to achieve conversational accuracy

  • Machine Learning is based on general learning algorithms grounded in statistical inference instead of large sets of static rules 

Bot Intelligence

MACHINE LEARNING

  • Discipline that uses Learning Algorithms, often grounded in statistical inference, to automatically learn rules through the analysis of large ammount of data

  • Statistical Inference is the process of infering Predictive Models

  • Predictive Models are created through main steps: data analysis, distribution visualization, transformation, predictive patterns inference from part of transformed data (Training) and finally model Evaluation with the other part of data

  • Neural Networks are a family of algorithms and models inspired by central nervous systems of animals

  • Examples are Google Cloud Machine Learning and Prediction APIAmazon Machine Learning or Microsoft Azure Machine Learning

Bot Intelligence

  • Bot main needs: Understand (parse text into structured data, categorize user intent), Converse (build natural answers), and Take Actions

  • Understanding includes extracting intents and entities from expressions through language models

  • Converse includes language generation, maintaining context (entities variables, user reference) and building a meaningful dialog

  • This main goals are achieved using Linguistic Analysis Libraries (Duckling) or APIs (IBM Linguistics)

  • Examples are Wit.ai (now Facebook Bot Engine), TextRazor, IBM Alchemy or Api.ai

NATURAL LANGUAGE PROCESSING

Bot Intelligence

  • Image Analysis extracts useful information from images, related taxonomy (tags and categories) and face recognition

  • Emotion Recognition extracts range of feelings from images, texts or recordings

  • Speech Recognition allows text-to-speech and speech-to-text

  • ​Recommendations allows Frequently Bought Together, Item to Item and Personalized User Suggestions

  • Others include Academic Knowledge Relations or Articles Analysis

  • Examples are Microsoft Cognitive Services, IBM Watson and Google Cloud Vision, Speech Recognition and Translate APIs

OTHER COGNITIVE SERVICES

BOT ARCHITECTURE

Bot Architecture

Cognitive Services

Persistance

Datasource

Other

Datasources

Composed API (Ex. GraphQL, Loopback)

Business Logic Layer

Communications Layer

Messaging Adapter

Messaging Adapter

Messaging Adapter

Data Access Layer

External API

BOTS & JAVASCRIPT 

Bots & JavaScript

  • NodeJS is a perfect match for Bot Development, due to be an event-driven, non-blocking I/O runtime that performs extremely well at high levels of concurrency

  • There is no asynchronous ecosystem like NodeJS's with more than 250k modules all written in async style

  • JavaScript allows Quick prototyping and faster Agile Iterations, which is specially important in an everchanging product landscape and Lean Approach

  • Downsides include use of inherent early technologies

BOT FRAMEWORKS

Bot Frameworks

  • Intelligence: Based on keywords or patterns. and sending messages through both real-time and http APIs. Includes Conversation support (multi-message).

  • Features: Real-Time API (Websockets-based API for receiving events and sending messages as user), Incoming Webhooks (HTTP request with JSON payload), Slash Commands (Slack).

  • Platforms: Slack and Facebook Messenger.

BOTKIT

BOTKIT EXAMPLE

BOTKIT EXAMPLE

Bot Frameworks

  • Intelligence: Allows keywords, patterns but also access to LUIS (Language Understanding Intelligent Service) AI API. Multi-message support through Dialog System that uses routes and waterfalls.

  • Features: Bot Connector (Connects to several platforms, translation service, analytics), Bot Builder Node SDK (Dialog System, Buil-int Prompts - Functions to collect text, dates, numbers, etc -), Emulator (Windows).

  • Platforms: Skype, SMS, Slack and Telegram.

MICROSOFT BOT FRAMEWORK

MICROSOFT BOT FRAMEWORK

MICROSOFT BOT FRAMEWORK EXAMPLE

Bot Frameworks

  • Intelligence: Allows keywords, patterns but also access to Wit.ai (NLP) AI API. Receives messages through Webhook Multi-message support through Dialog System that uses routes and waterfalls.

  • Features: Welcome Screen, Structured Templates (image, text and buttons), Wit.ai Bot Engine (train entities, intents and stories for NLP), Web Buttons to enable interaction, Customer Matching (connect with users through phone number).

  • Platforms: Facebook Messenger.

FACEBOOK MESSENGER PLATFORM

FACEBOOK MESSENGER PLATFORM

FACEBOOK MESSENGER FRAMEWORK EXAMPLE

THANK YOU

Rise of the Bots Redux

By Rafael Casuso Romate

Rise of the Bots Redux

Conversations are the next big interface and software robots are the personification of software applications. Let's check out their possibilities.

  • 1,538
Loading comments...

More from Rafael Casuso Romate