cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

In this article, you'll learn how to select then add content to create your generative knowledge base. This happens in 3 steps:

  1. Select relevant content
  2. Add content
  3. Build a flow

 

Select relevant content

In order to get the best possible results from your knowledge base AI, it's important to keep a few guidelines in mind when selecting content:

  • Only include data that is relevant to the questions from users. If you have a PDF with 100 pages, of which only 1 is relevant for customers, extract that page, and upload it separately.
  • In PDFs and URLs, complicated layouts might decrease the quality of the results
  • The knowledge base AI isn't good at understanding data from a table. Don't use knowledge base to upload database files.
  • Currently, knowledge base AI isn't able to process any images, video's or other media types
  • Currently, if your website requires JavaScript to be loaded, it can't be read by the knowledge base
  • If the URL has scraping protection activated, such as Incapsula, the webpage won't be able to be added to your knowledge base AI

Now, you know better what content your bot would scrape. Let's see how to add it to your bot.

 

Add content

Now that you selected relevant content, your bot needs to access your content. To do this, you need to add content to your bot which will constitute your knowledge base.

 

To add content to your bot:

  1. Navigate to the Knowledge base AI section inside of your bot. 

 

Screenshot 2023-12-11 at 08.21.16.png2. Click the Add content button at the top right corner of the screen. A window pops up from where you can add your content. 

There are 2 types of content you can add:

  • Documents, uploaded from your computer. These can be:
    • CSV files: are the only ones supported for non-generative knowledge bases, using a specific format. 
    • PDF files: e.g. product descriptions, FAQ documents, training documentation, etc.
  • URLs from publicly available websites. There are two options when you add URLs:
    • Only this page: only use the exact page that the URL links to.
    • Entire domain: use the page the URL links to and all linked pages.


Screenshot 2023-12-11 at 08.22.18.png

3. Add your content.

4. Once it's done, the content will show up in the Contents table. This table shows the name of your content, its type, its status, when it was added and when it was last synced. 

Screenshot 2023-12-11 at 08.10.39.png

5. Repeat this until you've added all the content that you would like your bot to know.

6. If you click on the three dots at the end of the row, you can:

  • Open your URL in a new tab (or preview your document if the content fits this type) .
  • Sync our URL (i.e. update it with the latest changes).
  • Delete your content.

Now, your knowledge base displays your content and is ready to be used inside conversations. Let's see how to build a flow that displays the answer.

Build a knowledge base flow

Once your bot has access to all relevant content, 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.

 

If you want to create a new chatbot, please watch the video:

 

Bildschirmfoto 2024-04-11 um 14.36.22.png

 

Making a knowledge base flow will happen in 2 steps:

  1. Retrieve the answer
  2. Display the answer

 

Retrieve the answer

The flow step to retrieve a response based on the knowledge base will happen inside an Action bot block.

 

To retrieve an answer from the knowledge base:

  1. There are 2 ways that you might want to use your knowledge base. Either:
    • In your Not Understood block, as a fallback option. To do this, go to your Not Understood block, change its block type to Action, and continue by following from step 2.
    • Anywhere in your flow. To do so, drop an Action block in your canvas. For this example, we will name this block "Generate answer".  
  2. Click on Knowledge base AI.        Group 10495.png
  3. Fill in the fields accordingly. You can configure:
    • Variable: the answer from the knowledge base will be stored as a variable. In the first field, you can choose the name of that variable.
    • No results: 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.
    • 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.

 

Screenshot 2023-12-11 at 08.41.31.png
 

4. Save your changes

 
You bot can now scrape the knowledge base and retrieve an answer based on it. But it cannot yet display that answer. Let's see how to change that.

 

Display the answer

To display the answer from the knowledge base:

  1. Open the Action block that generates your knowledge base answer.
  2. At the bottom of the block, add a Go To that goes to a block that you can create from within the dropdown. In this example, we will call this block "KB result".image (3).png
  3. Save your changes
  4. Open the newly created KB result block
  5. Add a text message that contains the variable you chose to save the knowledge base AI answer into. By default, this is {knowledgebase.answer}.image.png
  6. Save your changes

All done! Your knowledge base AI bot is now ready to be used 👏

 

 

How to link to the URL of your source in the bot answer

When your bot retrieves an answer from your knowledge base, this answer exists within a variable that also contains a link to the source of this answer. This source is either a PDF name or link to an URL.

In the case of an URL source, this URL link can typically be used as a button within the bot conversation.

 

Please remember that non-generative knowledge bases can only use .csv files.

Frame 956710.png

 

 

Find your knowledge base session data

To find your knowledge base session data:

  1.  Create your knowledge base using a URL as content.
  2.  Build your knowledge base AI flow as explained above.
  3. Test your bot by asking something for which the bot can retrieve a result.
  4.  In the Test your bot window, click on the Debugger button.
  5.  Scroll down the Debugger tab until you find the session data called knowledgebase.

 

Screenshot 2023-09-12 at 10.52.03.png

 

The knowledgebase object contains a few 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.

 

 

Display the knowledge base content URL in a button

You can use the URL of a knowledge base answer in a button, so that the user can learn more about a specific answer. 

 

To use the knowledge base URL within an answer:

  1. Create your text message.
  2. Add a button that displays the following variable: knowledgebase.retrieved[0].name. In this variable, name means that we're capturing the URL, [0] means that we're doing this for the first item of the retrieved array. Your bot message should look similar to this one:

 

 image (1).png

 

Your final result should be similar to this:

 

image4.png

 

 

See also:

Introduction to Knowledge base AI

Non-generative knowledge base AI

Use tags to limit your content

Version history
Last update:
‎04-11-2024 05:39 AM
Updated by: