Rise of the Bots

by Rafael Casuso

WHO IS @RAFAEL_CASUSO ?

Who is @Rafael_Casuso

  • Lead Front-End Engineer en StayApp

  • MerlinBot Creator

  • Fullstack Senior Developer

  • Software Architect

  • JavaScript enthusiast

  • #NoProjects + #NoEstimates believer

  • Focus on product and value

  • Lean approach

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

  • 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 API, Amazon Machine Learning or Microsoft Azure Machine Learning

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

  • Botkit: Allows development of bots on Slack and Facebook Messenger, receiving messages based on keywords or patterns and sending messages through both real-time and http APIs. Includes Conversation support (multi-message).

  • Microsoft Bot Framework: Allows development of bots that can expose an API (or you can develop your own compatible API) that uses a Connector to send and receive messages to SMS, Email, Skype, Slack and Telegram. Includes Dialog support (like routes)

  • Facebook Messenger Platform: Allows development of bots on Facebook Messenger, using Wit.ai for NLP, receiving messages through a webhook and sending messages through http API. Includes structured messages support (cards)

BOT PRACTICE

THANK YOU

Rise of the Bots

By Rafael Casuso Romate

Rise of the Bots

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

  • 1,997