Chatlayer Documentation
Get in touchAbout Chatlayer
  • Welcome
  • What's new
  • Send feedback
  • start quickly
    • Leadzy tutorial
      • 0. Introduction
      • 1. New bot, new block
      • 2. Understand your users
      • 3. Collect and display user input
      • 4. Steer the conversation with Conditions
      • 5. Empower your bot with Actions
      • 6. Set up a channel and publish your bot
    • Templates
      • Banking
      • E-Commerce Returns
      • E-Bike Shop
      • E-Scooter Support
      • Feedback
      • Find Nearest Location
      • GPT
      • 🆕Gym
      • Job applications
      • Knowledge base AI template
      • Lead generation
      • 🆕NPS
      • Restaurant
      • Retail
  • navigation
    • Analytics
      • Dashboard
      • Customers
      • Conversations
      • User flow
      • Intents
      • 🆕Funnels [Beta]
    • Bot builder
      • Flows
        • Canvas functionalities
        • Collaborate with team members
        • Manage your flows
        • 🆕[Beta] Export and import flows
      • Bot dialogs view
      • Translations
      • Events
    • NLP
      • Dashboard
      • Intents
      • Expressions
      • Entities
      • Train
      • NLP settings
      • Improve
    • Knowledge base AI
      • Add content to your KBAI
      • Build your KBAI flow
      • Use your KBAI source URL in a button
      • Use tags to limit your KBAI content
      • 🆕Use Tables to store your KBAI questions
      • 🆕Manage handover where KBAI is unsatisfactory
    • History
      • Conversations
      • Execution logs
      • Versions
    • Channels
    • Tables
      • Create a table with records
      • Column types
      • Operate on your records
        • Insert record
        • Update record
        • Retrieve record
        • Delete record
      • API
    • Settings
      • Bot settings
      • Offloading
      • Variables
      • Voice
      • Import/Export
  • build your bot
    • Conversation design
      • Plan your bot
      • Conversation design workflow
    • Flow logic
      • Blocks
        • Message
        • Condition
        • Collect input
        • Action
      • Go-to connections
    • 🆕Emulator
    • Tips & best practices
      • Route your flow depending on the time
      • Improve the Not understood block
        • How to create better not understood messages
        • Not understood counter
        • Not understood Google search
      • Go to previous block
      • Recognizing a returning user
      • Skip introduction message
      • Route your flow depending on the channel
      • Reuse flows
      • Connect two bots to each other
  • understand users
    • Natural language processing (NLP)
      • Basic NLP concepts
      • Detect information with entities
        • Match entities
        • Contextual entities
        • System entities
        • Composite entities
      • NLP best practices
        • Word order and diversity of expressions
      • AI intent booster
      • Train your NLP
      • Context
      • NLP import & export
      • Sentiment analysis
    • Languages
      • Supported languages
      • Make your bot multilingual
      • Change language within the conversation
  • set up channels
    • Add a channel to your bot
    • All channels
      • 🚨Facebook Messenger [Deprecated soon]
        • Facebook Admin Removal
        • Facebook Webview Whitelisting
        • Facebook Messenger API updates for Europe
      • 🚨Google Assistant [Deprecated soon]
      • Webhook
      • Web
        • 🚨Web V1 [Deprecated]
          • Customize web widget
          • Live example web widget
        • 🆕Web V2
          • 🆕From Web V1 to V2
          • 🆕Web V2 methods and options
    • Sinch Conversation API
      • Configure your Sinch Conversation API
      • 🆕 Make the most of RCS with Carousels
      • WhatsApp Business API
  • integrate & code
    • API calls
      • Configure your API integration
      • Advanced API features
      • V1 API Reference
      • Custom integrations 101
    • Code editor
      • [Example] Sending data to Airtable (POST)
      • [Example] Retrieving data from Airtable (GET)
      • [Example] Making SOAP requests
    • App integrations
      • Airtable
      • Freshdesk
      • Freshdesk Messaging
      • 🆕Gmail
      • Intercom
      • Mailgun
      • OpenAI: GPT-3, ChatGPT and GPT-4
      • Salesforce
      • 🆕Slack
      • Topdesk
      • Zendesk Support
      • Zendesk Sunshine (beta)
    • 🆕Expression syntax
    • Human handover & live chat
      • Sinch Contact Pro
      • #Interact
      • Genesys Cloud
      • Offloading Webhook
      • Salesforce Service Cloud
      • Sparkcentral by Hootsuite
      • Zendesk Chat
    • Chatlayer messages specifications
  • Publish
    • Publish your bot
      • Publish a flow
  • Analyze & maintain
    • Analytics definitions
    • Data retention
    • Maintenance
    • Session
    • Track events for analytics
  • VOICE
    • 🆕Send bot response as audio
    • Voicebots
      • Create a voicebot
      • Voicebot-specific actions
      • Test your voicebot
      • From chat to voice
  • access & support
    • Identity & Access
      • Single Sign-On (SAML SSO)
    • Billing & subscription
    • Get in touch
    • Chatlayer glossary
    • SaaS Regions & IP Ranges
    • Status
    • Debug your bot
      • No correct response
      • Collect input not working
      • Video isn't working
Powered by GitBook
On this page
  • Step 4: Add an intent
  • Create an intent
  • Add expressions to an intent
  • Make your intent trigger a response
  • Step 5: Train your NLP
  • Train the NLP model
  • Test your bot
  • [Optional: Test your knowledge]
  • Step 6: Edit your Not Understood block
  • Lesson 2 recap
  • Coming next
  • 💬 Feedback

Was this helpful?

  1. start quickly
  2. Leadzy tutorial

2. Understand your users

In the previous lesson, we created a new bot and edited its Introduction block. Now it's time to make your bot able to understand its users by powering it with our Natural language processing engine.

Previous1. New bot, new blockNext3. Collect and display user input

Last updated 8 months ago

Was this helpful?

Humans begin to process speech from birth. We hear numerous sentences over time which help us understand new ones. Consider your bot as a baby: it needs you to 'teach' it many expressions to recognize ones it has never encountered before.

Teaching a bot to process language is called Natural language processing, which you’ll see referred to as NLP. For a deep dive in NLP, read more .

In Chatlayer, building a NLP model is done in 3 steps:

Let’s build a small NLP model for our retail chatbot.

Step 4: Add an intent

After the bot introduced itself and suggested a discount, we would like users to be able to type if they’re interested. To do so, we need to add a yes intent.

Create an intent

To create an intent:

  1. Under the NLP tab on the left-hand side, click on Intents.

  1. Click on the + button at the top of the screen, or on the green Create intent button in the middle of the screen.

  2. A Create intent window opens. Give your intent the name yes, and add a description to it, e.g. An intent to agree or say yes to a discount.

  1. Click on Create.

Your intent now appears on your screen, with zero expressions in it. This means that it is empty. We need to add expressions to it so that we can use it.

Add expressions to an intent

To add expressions to your yes intent:

  1. From your Intents page, click on the yes intent that we just created.

  2. Type your expression in the text field. For instance, type yes please.

  3. Let’s first add expressions manually. Either click on the + button next to it, or click Enter on your keyboard. You can add expressions like:

    • yes

    • oh yeah!

    • i'd love that

  1. If you would like AI to generate expressions for you:

    • click the stars button next to the text field.

  • Accept the Generative AI terms and conditions.

  • You’re suggested a list of expressions based on the intent that you made. Select the generated expressions that you’d like to keep.

  • Click on Add selected.

The added expressions appear now as a list underneath your intent.

You've successfully created an intent! This means that your intent now has expressions. However, it's not yet utilized in the bot. Let's explore how to connect this intent to a block.

Make your intent trigger a response

For now, your intent exists in your chatbot but it isn’t used inside the conversation. In other words, when a user says ‘yes’, it wouldn’t trigger any response from the bot.

To make your intent trigger a response, we need to insert this intent in the bot canvas.

Add an Intent block to your canvas

To add your intent to your canvas:

  1. Under Bot dialogs, click on Flow to access your bot canvas.

  2. From the left-hand side, drag and drop an intent block to your canvas.

Connect your intent to a response

Now, if the user answers ‘yes’, we would the bot to answer ‘Amazing!’. To do so, we should link the intent block to another one by using a Go-to connection.

To connect your intent to a response:

  1. Still from inside your intent block, click on Go to, at the bottom of the window.

  2. Click on the placeholder to select a block where the bot should go to after this one. Create a new block by giving it a name. Type Yes to discount and select the Message block type.

  1. Click Save.

The yes intent now appears on your canvas and it’s linked to a block called Yes to discount.

Yet, the content of Yes to discount block is still empty. To edit the content of this new block:

  1. Click on the Yes to discount block to open it.

  2. Add a text there that says: Amazing!

  3. Save your changes.

The result on your canvas should look like this:

Time for testing the changes!

Test your bot

Reproduce what we did in step 3 to test your bot:

  1. Enter one of the expressions of the yes intent.

  2. Your bot should recognize the expression and answer Amazing!

  1. Click on the Restart conversation icon at the top right corner of the Test window.

  1. Now, enter something that wasn’t in your set of expressions, like yeah sure.

  2. Your bot should display the Not understood block as follows:

The Not understood block is triggered when your bot didn’t understand what the user said.

This means that your bot doesn’t recognize ‘yeah sure’ as a yes intent. Why is that the case? Because you we haven’t trained the NLP model yet!

Step 5: Train your NLP

Let's explore how to train the Natural Language Processing (NLP) model to recognize a wider range of expressions.

Train the NLP model

To train your NLP:

  1. From your Intents tab, click on the Train button at the upper right corner of your screen.

  1. A window pops up. Select English as the language that you want to train.

  2. Click on Update.

Test your bot

It’s time now to test the bot with our yeah sure again.

Your bot should recognize it, therefore answer with the right block!

[Optional: Test your knowledge]

Reproduce the same steps so that you add a no intent: create the intent, fill it with expressions, link it to a block, train your NLP and test it.

This is what it should look like on your canvas:

Step 6: Edit your Not Understood block

Every bot should have a way to redirect users to a human. Typically, this is what you want to happen if the user is not understood multiple times.

To edit your Not Understood block:

  1. From your canvas, double click on the Not Understood block to open it.

  2. Save your changes.

It should look like so on your canvas:

Lesson 2 recap

In this lesson, you’ve learned how to:

Coming next

In the next lesson, we will see how your bot can keep user input in memory to re-use it later.

💬 Feedback

Define what the users would mean (the ).

Define how users could formulate those intents (the ).

With those intents and expressions, so that your bot learns to properly label an expression with an intent.

Intents are a group of expressions or utterances that mean the same thing. When you build a chatbot, an intent can be referred to as a user goal. For instance, the intent yes could be made of expressions like I agree, Yes, yes please, etc. Learn more about intent and expressions .

The Intent block opens on the right-hand side on the screen. From the dropdown, select yes, which is .

On Chatlayer, a is represented by an arrow on the canvas. If the block A is linked to block B by a Go-to, it means that block B will happen just after block B in the conversation.

If you haven’t , your chatbot will only be able to recognize the exact expressions that you have entered in an intent.

model allows your bot to understand new expressions that convey the same meaning as those already entered in an intent.

You can see when was the last time your NLP was updated by checking the . To do so, go to Dashboard under the NLP tab.

Tip: turn on the to increase the recognition of your intents for smaller bots. This will be explored in a follow-up tutorial dedicated to the Chatlayer AI functionalities.

Edit the text for the following: I’m sorry, but I didn’t get that. Please try a rephrase or send us an email with your question: .

Your feedback on the tutorial means the world to us! Please, let us know what you think through

intents
expressions
train the NLP
here
Go-to connection
Training your NLP
NLP dashboard
AI Intent booster
email@company.com
3. Collect and display user input
this short form.
the intent that you just created
trained your NLP
here
What will be built in Leadzy lesson 2.
The Intents tab is empty.
Create a new yes intent and give it a description.
The yes intent has 0 expressions in it.
Manually add expressions to your intent.
Generate new expressions using AI.
Add AI-generated expressions to your intent.
The yes intent contains 6 expressions.
Add the yes intent to your canvas.
The yes intent triggers the Yes to discount block.
Test your flow if you say yes to a discount.
Restart the test conversation.
Test your bot with an expression that wasn't in your intent.
Train your NLP by clicking the button on the top right corner of your Intent tab.
Select the language to train your NLP on.
Test your flow with an expression which isn't part of your set of expressions.
The no intent triggers the No to discount block.
When the user says something that the bot doesn't understand, the Not understood block gets triggered.