際際滷

際際滷Share a Scribd company logo
Developer Workshop
Build your first chatbot
1. Bots
2. Natural Language Processing
3. Conversation
4. Workshop
5. Resources
Bots
What is a bot?
A bot is a program that
automates a task. Users
interact with it through
messaging channels. The
bots understand the
request and perform an
action.
Recast.AI
Collaborative end-to-end bot platform
BUILD CONNECT MONITORTRAIN
Build conversation
flow and powerful
logic
Train your bot to
understand human
language
Connect your bot to
multiple messaging
or fallback channels
Improve your bot by
monitoring logs and
usage analytics .
Bot architecture
Logic
Answers
2
3
Bot Connector
Bot Builder
API
Backend
Get the users input
Building Blocks of a Bot
Understand what the user
says
Manage the conversation
and understand context
Improve the behavior by
learning overtime
Answer in a relevant way
Natural Language
Processing
Understanding input
Natural Language Processing tasks
Intent Classification
Entity Extraction
Understanding input
Natural Language Processing tasks
I want a margherita pizza to be delivered at 5:00PM.
Intent Classification
Entity Extraction
Intent: Order a pizza
Pizza type: margherita
Datetime: 5:00PM July
11th 2018
A bot is made of intents
An intent is a set of
expressions that mean
the same thing but are
constructed in different
ways. Each one of your
intents represents an
action your bot is able to
understand.
Every intent is trained with expressions
An expression is a
sentence your bot can
understand: basically your
users inputs. Expressions
are organized in intents
and constitute the entire
knowledge of your bot.
discover-movie
INTENT
I want to watch a movie Any good western tonight? I want to start a new show!
greetings weather
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.
Entities are extracted from each expression
An entity is a keyword
extracted from an
expression. We detect
automatically 31 different
entities such as
datetimes, names,
locations, etc.
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
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.
Skills definition
Conversation made using Skills
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.
Here is an example of a
conversation with an E-
commerce chatbot to
track an order.
E-commerce example
Example of conversation
Closely linked to the
core purpose of your
bot
Business
Small talk and non-
core related
questions
Floating
Will be triggered
automatically if no
other skills is
Fallback
Skills type
There are 3 different types of skills
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)
Skill logic
It is composed of three distinct parts
Skills have conditions
Conditions define tests
that will either be true or
false. You will find
conditions in different
parts of your skill:
triggers, requirements and
in each message group in
actions.
Conditions have operands
Inside your data
conditions, you will find a
list of operands.
@ means intent
# means entity
_ means NLP attribute
Entities SkillsIntents
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
Workshop
Fork bot on Recast.AI:
https://recast.ai/sanjana-reddy/movie-bot-skills-training/
Clone github repo:
https://github.com/plieb/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

More Related Content

Bot builder workshop

  • 2. 1. Bots 2. Natural Language Processing 3. Conversation 4. Workshop 5. Resources
  • 4. What is a bot? A bot is a program that automates a task. Users interact with it through messaging channels. The bots understand the request and perform an action.
  • 5. Recast.AI Collaborative end-to-end bot platform BUILD CONNECT MONITORTRAIN Build conversation flow and powerful logic Train your bot to understand human language Connect your bot to multiple messaging or fallback channels Improve your bot by monitoring logs and usage analytics .
  • 7. Get the users input Building Blocks of a Bot Understand what the user says Manage the conversation and understand context Improve the behavior by learning overtime Answer in a relevant way
  • 9. Understanding input Natural Language Processing tasks Intent Classification Entity Extraction
  • 10. Understanding input Natural Language Processing tasks I want a margherita pizza to be delivered at 5:00PM. Intent Classification Entity Extraction Intent: Order a pizza Pizza type: margherita Datetime: 5:00PM July 11th 2018
  • 11. A bot is made of intents An intent is a set of expressions that mean the same thing but are constructed in different ways. Each one of your intents represents an action your bot is able to understand.
  • 12. Every intent is trained with expressions An expression is a sentence your bot can understand: basically your users inputs. Expressions are organized in intents and constitute the entire knowledge of your bot.
  • 13. discover-movie INTENT I want to watch a movie Any good western tonight? I want to start a new show! greetings weather 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.
  • 14. Entities are extracted from each expression An entity is a keyword extracted from an expression. We detect automatically 31 different entities such as datetimes, names, locations, etc.
  • 15. 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.
  • 17. 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. Skills definition Conversation made using Skills
  • 18. 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.
  • 19. Here is an example of a conversation with an E- commerce chatbot to track an order. E-commerce example Example of conversation
  • 20. Closely linked to the core purpose of your bot Business Small talk and non- core related questions Floating Will be triggered automatically if no other skills is Fallback Skills type There are 3 different types of skills
  • 21. 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) Skill logic It is composed of three distinct parts
  • 22. Skills have conditions Conditions define tests that will either be true or false. You will find conditions in different parts of your skill: triggers, requirements and in each message group in actions.
  • 23. Conditions have operands Inside your data conditions, you will find a list of operands. @ means intent # means entity _ means NLP attribute
  • 24. Entities SkillsIntents 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. Fork bot on Recast.AI: https://recast.ai/sanjana-reddy/movie-bot-skills-training/ Clone github repo: https://github.com/plieb/movie-bot-skills-training Install Ngrok: https://ngrok.com/ Follow tutorial: https://recast.ai/blog/nodejs-chatbot-movie-bot/