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

Was this helpful?

  1. understand users
  2. Natural language processing (NLP)

NLP best practices

Some of the best ways to set up a strong and reliable NLP model for your bot.

PreviousComposite entitiesNextWord order and diversity of expressions

Last updated 9 months ago

Was this helpful?

⭐️ Best practices to create good intents

Some tips to create the best intents:

  • Use intents that you already have

Have customer data like FAQs? Analyze it to see which questions are most common and important, then program your bot to handle those. Calculate each question's volume to prioritize them. Unsure what users need? Start with a simple click-bot to gather data, then use that info to define your bot's intents.

  • Start small

Start small. If your bot can handle 5 out of 15 questions but covers 80% of queries, that's a great start. This allows your team to address the remaining 20%. Add new intents based on user data and let your bot grow naturally. It's better to start small and excel than to do too much and fail.

  • Balance the number of expressions per intent

It’s important to have about the same number of expressions per intent to make sure that the bot doesn't train more on intents with a large expression count, ignoring the ones with a less expressions.

  • Revise and optimize

Start with a general intent to trigger a basic flow, then add follow-up questions to understand user needs better, allowing you to refine intents later.

For example, in a telco support bot:

  1. Issue with phone

  2. Issue with wifi

Each intent can cover multiple issues (battery, screen, software, lost order for phones; connection types for wifi). Use follow-up questions to specify the problem (e.g., phone model, modem type). Over time, analyze user messages: if users often specify phone models but not wifi issues, create more intents or use entities for phones while keeping wifi intents broad. Creating intents is an ongoing, iterative process.

  • Avoid conflict

When intents are very similar, merge them to avoid confusion. For example, if you have intents for booking train and bus tickets, merge them into one 'booking tickets' intent, and differentiate by the transportation mode entity.

⭐️ Best practices to create good expressions

Creating a good set of expressions is key to create a smart bot. The accuracy of your bot stands or falls with the quality of your expressions, so make sure to spend enough time on this, as well as reviewing them regularly.

Here are some tips & tricks for creating good expressions:

  • Use diverse expressions in terms of vocabulary and structure

For more information, read our .

  • Use real live data

Chances are there are already a lot of user expressions which you can feed to your bot. Think customer support logs, social media posts, comments on your company's forum etc.

  • Use pre-built intents

No need to reinvent the wheel when you can download the wheel directly on the Chatlayer platform! We have a lot of ready for you to use. Simply download them, train the NLP, and you're good to go!

  • Be specific

Expressions must match a specific intent. For change_address, phrases like I have a question are too vague. For forgot_password, I forgot it is insufficiently specific. Be clear and precise.

  • Avoid filler words

Avoid adding the expression hello, I want to book a train ticket. Can you help me with that? Thanks, because this sentence contains too many irrelevant words. Simply use I want to book a train ticket which is shorter and more relevant.

  • Use real language

Add words and sentences to your bot which a real person would use in this conversation. Don’t use entire paragraphs or language which is overly formal. Keep it light and natural instead. Make use of real user messages in case you have them; data is knowledge.

  • Allow for slang and dialect

Feel free to use slang words, common abbreviations (e.g. asap instead of as soon as possible) and regional dialects. Don’t overdo it though: only stick to things the majority of people would actually use.

  • Create enough expressions

To achieve optimal bot performance, ensure each intent has 40 to 50 expressions. For excellent behavior, aim for 200 to 400 expressions per intent. Regularly review your user data and incorporate user-provided expressions to continually improve your model’s accuracy.

  • Keep the number of expressions balanced

Ensure a balanced number of expressions per intent. If one intent has 100 expressions and another only 10, the model will more often match user messages to the intent with 100 expressions, causing overtriggering. Inaccurate matches happen because the model learns better from the intent with more data.

  • Use correct spelling

Ensure each word in the training data is correctly spelled. The engine maps words to numeric formats but only for a predefined 200,000-word vocabulary. Misspelled words can lead to incorrect interpretations, like pone being corrected to pony or phone. Verify spelling to ensure your bot accurately learns relevant meanings.

  • Lower case vs UPPER CASE

Users often do not use capitalisation when chatting with a bot. However, for intent classification, capitalisation is ignored, so you do not have to worry about it. But be careful: capitalisation is relevant for entity extraction.

  • No need for punctuation (or accents)

Punctuation and accents are ignored by our NLP, so don't worry about adding them. For instance, élève is treated the same as eleve.

⭐️ Best practices to create good entities

should only be used if their value is needed in the bot flow.

When adding entities to your training data, take the following things into account:

  • Punctuation

Do not include any punctuation like '.' or '?' in your entity. '-' is ok, as it is often part of the entity, as in Sint-Niklaas.

  • Capitalisation

The entity extraction models are not case sensitive. So there is no need to add both Brussels and brussels.

  • Words, not sentences

Entities are a word or small number of words, usually noun phrases. Never mark full sentences or bigger phrases as an entity. In case users often use paraphrases instead of a word, which frequently happens with more technical terms, such as the little box that I use in order to have internet everywhere in my house instead of wifi extender, consider not using entities but a separate intent.

  • Display entities in expressions

We recommends adding at least 30 expressions per entity, to guarantee the quality of the entity detection

dedicated article
Word order and diversity of expressions
Entities
pre-built intents