Build Your First Chatbot: Developer Workshop

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 31

Developer Workshop

Build your first chatbot


What’s a bot?
A bot automatise a behaviour

A bot is a program that


automatise a task.
Through messaging
channels clients make a
request. The bot
understands and executes.
Recast.AI
Collaborative end-to-end bot platform

BUILD TRAIN CONNECT MONITOR

Build complex Train your bot to Connect your bot to Monitor through logs
conversations and understand human multiple messaging and usage analytics
powerful logic language or fallback channels to improve your bot
#1 Bots
#2 Natural Language Processing
#3 Conversation
#4 Workshop
#5 Resources
Bots
Bot architecture #2
Only using NLP from Recast.AI

Client’s IT

Bot Connector
3
API

2 Logic
Bot Builder

4 Answers
Bot Builder

First we get user’s Second we need to Third we need to


input through a understand user’s manage the
messaging channel input with NLP conversation
What a bot should do?
4 steps toward a successful conversation

Understand user’s input

Answer in a relevant way

Manage the conversation & context

Learn overtime
Understanding the user’s input
Natural Language Processing tasks

Intent classification

Entity extraction
Natural Language
Processing
An intent is a box of
expressions that mean the
same thing but are
constructed in different
ways. Each one of your
intents represents an idea
A bot is made of intents your bot is able to
understand.
An expression is a
sentence your bot can
understand: basically your
users’ inputs. Expressions
are organized in intents
Every intent is trained with expressions and constitute the entire
knowledge of your bot.
I want to watch a movie Any good western tonight? I want to start a new show!

greetings discover-movie weather

INTENT

The more expressions you have, the more precisely your bot will be able to understand its
users. The aim is to detect in which intent box an expression the bot has never seen is.
An entity is a keyword
extracted from an
expression. We detect
automatically 31 different
entities such as datetimes,
Entities are extracted from each expression names, locations, etc.
1 EXTRACTION

2 ENRICHMENT

"datetime": [
{
"formatted": "Sunday, 01 January 2012

3 NORMALISATION at 12:00:00 AM (+0000)",


"iso": "2012-01-01T00:00:00+00:00",
"raw": "in 2012"
}
]
Entities with a black star next to them are called Gold entities
they are automatically detected and extracted. But you are not
limited to these Gold entities: you can also tag your own custom
entities to detect keywords depending on your bot's context,
such as movie genres if you are building a movie bot.
Conversation
Skills definition
Conversation made using Skills

A bot conversation is made of Skills. A skill defines a specific


block of conversation that has a clear purpose. A skill can be
as simple as the ability to greet someone, but it can also be
more complex, for example giving movie suggestions based
on information provided by the user.
E-commerce example
Conversation made using Skills

E-commerce

An E-commerce chatbot
could have 3 Skills such
as: product search, order
tracking and small talk.
E-commerce example
Example of conversation

Here is an example of a
conversation with an
E-commerce chatbot to
track an order.
Skills type
There are 3 different types of skills

Closely linked to the Small talk and Will be triggered


core purpose of your non-core related automatically if no
bot questions other skills is

Business Floating Fallback


Skill logic
It is composed of three distinct parts

Triggers
Conditions determining if the skill should or shouldn't be activated

Requirements
Determining the information the bot needs to retrieve from the user, and how to
retrieve it

Actions
performed by the bot when all requirements are complete (for example, send a
message)
Conditions define tests
that will either be true or
false. You will find
conditions in different
parts of your skill: triggers,
Skills have conditions requirements and in each
message group in actions.
Inside your data
conditions, you will find a
list of operands.

@ means intent
Conditions have operands # means entity
_ means NLP attribute
Intents Entities Skills

To summarise a bot is made of intents


that are made of expressions that contain
entities. Intents and entities are used by
Skills to manage conversation
26
Recast.AI - 2017 Confidential
Workshop
Clone github repo:
https://github.com/plieb/movie-bot-skills-training

Fork bot on Recast.AI:


https://recast.ai/pe/movie-bot-skills-training/

Install Ngrok: https://ngrok.com/

Follow tutorial:
https://recast.ai/blog/nodejs-chatbot-movie-bot/
Resources
Slack: slack.recast.ai
Github: github.com/RecastAI
Doc:recast.ai/docs
Blog:recast.ai/blog

Contact us

Pierre-Edouard Lieb
Partnerships Manager
pe@recast.ai
+33 6 68 10 71 84
Developer Workshop

Build your first chatbot

You might also like