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
  • Retrieve the KBAI answer
  • Display the KBAI answer
  • Route your KBAI flow

Was this helpful?

  1. navigation
  2. Knowledge base AI

Build your KBAI flow

Learn how to set up your own knowledge base AI and use it in a flow to cover any FAQ.

PreviousAdd content to your KBAINextUse your KBAI source URL in a button

Last updated 8 months ago

Was this helpful?

Once you , it's time to build a flow where your bot will know when to browse this knowledge base to provide an answer to your customer's question.

To create your KBAI flow you could either:

Retrieve the KBAI answer

To retrieve an answer from the knowledge base:

  1. Drop an block in your canvas. For this example, we will name this block "Generate answer".

Many customers will preferably have their knowledge base flow happening after the bot did not understand what was asked, as a fallback option. To do this, go to your Not Understood block, change its block type to Action, and continue by following the steps below.

  1. Click on Knowledge base AI.

  1. Fill in the fields accordingly. You can configure:

    • On no findings: if the question that the user asks cannot be answered by the knowledge base AI, a block will be triggered. You can select which block in this dropdown.

    • On failure: if there is a problem with the knowledge base AI, and it returns an error, you can select a block which the user will be led to. By default, users will be routed to the Error Occurred block.

  1. Save your changes.

You bot can now scrape the KBAI and retrieve an answer based on it. But it cannot yet display that answer. Let's see how to do that in the section below.

Display the KBAI answer

To display the answer from the knowledge base:

  1. Open the Action block that you just created.

  2. At the bottom of the block, add a Go-to to a block that you can create from within the dropdown. In this example, we will call this block KB result.

  1. Save your changes.

  2. Open the newly created "KB result" block.

  3. Add a Text message that contains the variable you chose to save the knowledge base AI answer into. By default, this is {knowledgebase.answer}.

  1. Save your changes.

Route your KBAI flow

There are multiple ways to route your KBAI flow.

KBAI session data

The knowledgebase object contains several fields:

  • answer: the answer that can be used in a text message in your bot

  • retrieved: an array of all the content that was used to formulate the answer. For each array item, the following data is stored:

    • type: type of the source: "URL" or "DOC"

    • name: filename of the document or link of the URL

    • content: snippet of the content that was used to generate the answer

    • contentType: type of the source: "URL" or "DOC"

  • contentUrl: URL of the source that was used. If a domain was scraped as content, this URL will refer to the specific page from which the answer was retrieved.

You might also want to use tags in your content to specify which content the bot should look at.

Destination variable: the answer from the knowledge base will be stored as a . In the first field, you can choose the name of that variable.

You could route your KBAI flow based on the inside the knowledgebase object.

You can access your KBAI session data by using the tab inside the Emulator.

tags: any that were retrieved that are associated to the content source.

variable
tags
Use tags to limit your KBAI content
session data

added content to your KBAI
Action
Debugger
Cover

Use the KBAI template bot

Make your KBAI flow with a ready-made bot.

Cover

Build your own KBAI flow

A step-by-step guide on how to make your FAQ flow using KBAI.

Add a Knowledge base Action block to generate an answer.
Set up how your bot retrieves an answer with KBAI.
Add a block that displays the generated answer.