Use a Knowledge Base integration when you want to search one of your knowledge bases for articles. You’ll need to create the knowledge base first; for help with that, see here.

One use case for this type of integration is within a fallback dialog to funnel user utterances into a knowledge base search. If an appropriate search result is found, it can be displayed; if no results are found, you might then display a "sorry" message or escalate the conversation to a human agent.

The Simple FAQ bot template provides a bot that answers users' questions by connecting to a knowledge base. For details, see here.

To add a Knowledge Base integration

  1. Open the bot, and click Integrations in the upper-left corner.
  2. Configure the integration settings (required fields are marked with asterisks):
    • Integration Name: Enter the name of integration. Enter a name that's meaningful (it describes well the integration's purpose), concise, and follows a consistent pattern. This helps with organization, and it makes it easier for bot developers to work with the integration during bot development.
    • Response Data Variable Name: Enter the name of the response data variable.
    • Integration Type: Select Knowledge Base.

    • Knowledge Base: Select the knowledge base to search. You can select from all public knowledge bases that exist under your organization.
    • Methods:
      • Phrase Search: Select this method to use NLU to search for the phrase defined in the request parameter against the articles and their associated "standard" tags. You can define "standard" tags via the Knowledge Base UI or a CSV file import.
      • Special Tag Search: Select this method to search for the special tags defined in the request parameter against the special tags associated with the articles. Special tags are different from standard tags. Special tags have a prescribed format; they don't support NLU searches, and they function more like attributes. Typically, special tags are used for returning products or items. You can define special tags via a CSV file or Google sheet import.
    • Request Parameters for a Phrase search:
      • mode: Select either Intents, Intents Only, or All. For a description of each mode, see here.
      • threshold: Select the minimum score that a result must have in order to be returned, either VERY GOOD, GOOD, or FAIR PLUS. For more on thresholds, see here.
      • phrases: Enter the phrase for which to search. The default value is {$query}, which represents/stores the last, complete response sent by the consumer.
      • multipleResults: Select the number of results to return from the knowledge base, anywhere from one to five. The default value is 1.
    • Request Parameters for a Special Tag search:
      • mode: Indicates whether to perform an "and" or "or" search using the special tags.
      • specialTags: The comma-delimited list of tags for which to search. The default value is {$query}, which represents/stores the last, complete response sent by the consumer.
    • Transform Result Script: If applicable, use this section to write JavaScript code that transforms the raw result (typically in JSON format), so you can use the information in the bot's dialog. For more on this, see Transform an API result.
    • Custom Data Fields: Add the fields that will store the result data in key/value pairs. Users who are tasked with creating bots can use and display this data in interactions by referencing these fields as described here.
  3. Click Save.