KnowledgeAI integrations are a legacy feature. For a simpler, more powerful approach, use a Knowledge AI interaction within the bot; it doesn't require a KnowledgeAI integration.

Use a KnowledgeAI integration when you want to search one of your knowledge bases for articles. You’ll need to create the knowledge base first.

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 transfer the conversation to a human agent.

The Simple FAQ bot template provides a bot that answers users' questions by connecting to a knowledge base.

Add a KnowledgeAI 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 KnowledgeAI.

    Integration settings for a KnowledgeAI integration

    • Knowledge Base: Select the knowledge base to search. You can select from all public knowledge bases that exist under your organization.
    • Method: This is always "Phrase Search," which means the search is performed using the phrase that's defined in the request parameter.
    • Request Parameters:
    • 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.
  3. Click Save.

Best practices

When integrating answers from KnowledgeAI into a bot, carefully consider where in the bot flow it’s best to do this. You want the consumer’s utterance to be answered by the right, topically relevant knowledge base, at the right time. For example, in a bot that can handle billing tasks and questions, plug in a “Billing questions” knowledge base. This kind of contextual approach is more focused, so it generally yields a high answer rate.

In contrast, strategies that are less targeted can yield a lower answer rate. For example, plugging a general purpose knowledge base into the Fallback dialog is an option, but it could yield a low answer rate.