Introduction

A KnowledgeAI™ integration searches a knowledge base for articles, i.e., answers to send to consumers.

One use case for this type of integration is within a fallback dialog, to funnel consumer 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 a user's questions by connecting to a knowledge base.

When to use this integration

To automate answers in a Voice bot, use this type of integration (within an Integration interaction). See our example in the next section.

However, to automate answers in a Messaging bot, this type of integration is considered a legacy approach. We recommend the Knowledge AI interaction instead. It's simpler and more powerful in a Messaging context.

Using this integration to automate enriched answers created via Generative AI? See this discussion.

Search flow

Learn about the search flow.

KnowledgeAI integrations in Voice bots

Here’s a common approach to answering questions in a Voice bot:

An example of using an Integration interaction in a bot, where that interaction searches a specified knowledge base. After the Integration interaction, there's a Speech question that plays the answer and then either performs another search if the consumer says something, or transfers the call to an agent if the consumer says a word like help or agent

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 variable that gets populated with the response from the API.
    • Integration Type: Select KnowledgeAI.
    • Knowledge Base: Select the knowledge bases to search. You can select anywhere from one to five.

      The first knowledge base that you select filters the list of remaining ones you can choose from: All of the knowledge bases must belong to the same language group. For example, UK English and US English are fine together. Behind the scenes, the system validates the first two characters of the ISO language code.

      What's more, you can select a mix of internal knowledge bases and external knowledge bases that use LivePerson AI. But you can’t mix external knowledge bases that don’t use LivePerson AI with any other type.

    • Method: This is always "Phrase Search," which means the search is performed using the phrase that's defined in the request parameter.
    • Request Parameters:
      • mode: Select from the following search methods: KnowledgeAI (recommended), Intent match only, or AI search only. In Production, we recommend that you use the “KnowledgeAI” offering. The “Intent match only” and “AI search only” options are primarily intended for testing and for diagnosing issues during troubleshooting. This field isn't shown if you've selected an external knowledge base that doesn't use LivePerson AI.
      • threshold: Select the threshold (minimum score) that a result must have in order to be returned, either VERY GOOD, GOOD, or FAIR PLUS. This field isn't shown if you've selected an external knowledge base that doesn't use LivePerson AI.
      • phrase: 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 matched articles to retrieve from the knowledge base, anywhere from one to five. The default value is 1. (The number of results that are ultimately sent to the consumer depends on how you implement the dialog in the bot, i.e., the interactions that send the answers.)
    • 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.