Add an internal knowledge base

  1. Access the Knowledge Base application as described here.
  2. In the dashboard that lists your knowledge bases, click Add Knowledge Base in the upper-right corner.
  3. On the AI Enabled tab of the window that appears, select Internal Knowledge Base.
  4. Specify the following:
    • Knowledge Base Name: Enter a display name for the knowledge base.
    • Language: Select the language of the knowledge base. The default value is English. For details on how the language is used, see here in the overview.
    • Import articles from: You can add articles manually, but if you have them in an external file, you can import them now. Select either "CSV" or "Google Sheet," and use the controls provided to upload the file's contents. The Google sheet must be public, i.e., with no file restrictions in place. For details on creating an import file, see farther below.

      If you select "Google Sheet" and you provide the URL to the sheet, be aware that this establishes a link between the knowledge base and the sheet. If you later sync the knowledge base, it is updated with the current contents in the sheet.

      IMPORTANT: When creating one knowledge base based off of another, don't reuse the same CSV import file or Google sheet for a second knowledge base in the same hosted region. The article IDs must be unique within the region. In the file for the second knowledge base, clear the article IDs; the application will create article IDs for new articles.

    • Intent Association: This field specifies where the intents reside, either in the knowledge base itself or in a domain in Intent Builder. Select either "Domain Intents" or "Knowledge Base Intents" (a legacy feature). If you select "Domain Intents," also select the domain from the list that appears. Take care when selecting the domain; you can't change the domain after adding the knowledge base. For an introduction to Domain intents versus Knowledge Base intents, see here.
  5. Click Save.

    This creates the knowledge base, and takes you to its search view. In this default view, you can search the title, intent qualifiers and content of articles.

    If you specified a CSV or Google sheet to use as an import file, the articles in the file are enabled by default. This means they will be returned by knowledge base searches in a Knowledge Base integration, once you add an integration. You can disable articles on a per article basis, as described here.

Create an import file

If you want to import a set of articles into a knowledge base when you add the knowledge base, you'll need to create the import file.

The import file can contain the following basic HTML tags: p, br, a (only the “href” attribute and “http”/"https” protocols are supported).

To create an import file

  1. Create a new CSV file or Google sheet. A Google sheet must be public, i.e., with no file restrictions in place.
  2. Add the column headers listed below; use the order listed in the table below.
  3. Fill out the rows with your article data. It's recommended that you complete at least these columns: title, summary, detail, tags, and alternates (if using Knowledge Base intents) or intentName (if using Domain intents).

Column headers

Column header name Description
id A String; a unique ID assigned to an article.

This column isn't required when you initially create the knowledge base. However, if you're using a Google sheet that you plan to sync periodically, it does play a role then. Before performing a sync, update the Google sheet to include the "id" column and enter the IDs for all existing articles.

When creating one knowledge base based off of another, don't reuse the same CSV import file or Google sheet for a second knowledge base in the same hosted region. The article IDs must be unique within the region. In the file for the second knowledge base, clear the article IDs; the application will create article IDs for new articles.
tags A comma-separated list of relevant keywords. These highlight the key noun(s) or word(s) in the training phrases. For example, for an article about health insurance, the tags should be "health", “insurance”, “benefits”. These should be words, not sentences.
title The article title. This should be a complete sentence or question that the user might ask. See here for best practices.
summary A short response or message to be sent to the user. You can include web links, although depending on the channel they might not display correctly. For SMS/Messaging, you might need to show the URL by itself, not wrapped in HTML, since the HTML will be sent as plain text over these channels.
alternates Applicable if you're using Knowledge Base intents, not Domain intents (see here for an understanding of the two). In the UI, these are called "intent qualifiers." Intent qualifiers are alternative ways that people ask for the article, i.e., alternative ways to communicate the same intent. See here for best practices.
detail A longer message to the user. For messaging, it's recommended that you keep the responses as brief as possible.
content_url The URL of a hyperlink. For more on this, see here.
image_url The URL of an image. For more on this, see here.
audio_url The URL of an audio file. For more on this, see here.
video_url The URL of a video file. For more on this, see here.
category Assigning a category lets you filter and find articles based on categories in the Knowledge Base application.
positiveLearnings These are phrases for which you want a match to the article to occur. A comma-separated list.
negativeLearnings These are phrases for which you don't want the article to appear in the result even if it is matched to the consumer's intent. A comma-separated list.
intentName Applicable if you're using Domain intents, not Knowledge Base intents (see here for an understanding of the two). This is the intent associated with the article.
validFrom Specify the date and time on which the article becomes active in Epoch time in milliseconds. For more on active versus inactive articles, see here.
validTo Specify the date and time on which the article becomes inactive in Epoch time in milliseconds. For more on active versus inactive articles, see here.

Configure knowledge base settings

To configure knowledge base settings

  1. Open the knowledge base.
  2. In the upper-left corner, click Settings.
  3. Configure the common settings discussed here. You can also configure these settings below, which are specific to internal knowledge bases:
    • Language: Change the language if desired. For information on the role that the language plays, see here.
    • Import articles from: After you've added a knowledge base, you can't subsequently import articles from a CSV file. However, you can link a Google sheet to the knowledge base, but be aware that, once you sync with the sheet, the contents of the knowledge base are overwritten with the contents in the sheet. The Google sheet must be public, i.e., with no file restrictions in place.
    • Associated Domain for Entity: This field is only displayed if the knowledge base uses Knowledge Base intents. If desired, you can change the domain where the entities used in the knowledge base are defined.
  4. Click Update.

Convert Knowledge Base intents to Domain intents

When you convert Knowledge Base intents to Domain intents, the system takes each article title in the knowledge base and creates an intent in Intent Builder in the domain that you specify. Additionally, all the intent qualifiers in the articles are converted to training phrases for their respective intents in Intent Builder.

From a workflow perspective, the process of testing the knowledge base and adding/changing training phrases moves from the Knowledge Base application to the Intent Builder application.

Before taking this action, be certain about doing so. Once you convert the intents, you no longer see and can no longer use Knowledge Base intents in the affected knowledge base. Also, this action irreversibly modifies the domain that you select as described above.

To convert from Knowledge Base intents to Domain intents

  1. Open the knowledge base.
  2. In the upper-left corner, click Settings.
  3. Click More Options, and scroll down to the Intent Association section.
  4. Click Convert to Domain Intents.
  5. In the dialog that appears, select the domain.
  6. In the confirmation dialog, click Confirm.

    This converts the intents and associates the selected domain.

Sync with a Google sheet

After you've made changes to the Google sheet that's linked to the knowledge base, sync the knowledge base to update it with the content.

This action overwrites the content in the knowledge base with the content in the Google sheet, so use caution when performing this. Also be aware that all new articles in the sheet are enabled by default (which means they are returned in knowledge base searches in Knowledge Base integrations), so ensure the contents of the sheet are suitable before you sync. You can disable articles on a per article basis, as described here.

Before performing a sync, make sure the Google sheet includes the "id" column that contains the IDs for all existing articles. If it doesn't, update the sheet accordingly before syncing.

To sync a knowledge base with a Google sheet

  1. Open the knowledge base.
  2. In the upper-left corner, click Settings.
  3. Click More Options, scroll down to the Sync Google Sheet Data Source section, and click (Refresh icon).

Download a knowledge base

Download of a knowledge base creates a CSV file.

You might need to download a knowledge base for a few reasons:

  • You want to create a copy of the knowledge base by downloading it and then adding a new knowledge base using the CSV as the import file.
  • You want to move or copy the knowledge base to another environment.
  • You want an extra measure of back-up, so you plan to archive the CSV file for safekeeping.

To download a knowledge base

  1. Open the knowledge base.
  2. In the upper-left corner, click Settings.
  3. Click More Options, scroll down to the Download Knowledge Base section, and click (Download icon).
  4. Follow the browser prompts to access and save the CSV file to a location of your choice.