Using a Knowledge Base model

Learn how to use knowledge base models in your scripts.

About this task

Any automation can use a knowledge base model. However, naturally, the most common applications for knowledge base models are:

  • Decision-making based on uncontrolled text input
  • Nonlinear interaction with user by text input

The following figure illustrates the use of knowledge base models in automation.

Knowledge Base usage process.

The process of using a knowledge base model in automation consists of the following steps:

  1. String input

    A string input feeds the knowledge base model. The input can originate from media such as emails, support tickets, or, commonly, user input by chatbot or Interactive Voice Response (IVR).

  2. Processing

    The knowledge base model processes the string input to find the appropriate answer. You trigger this processing by using the Answer question (answerQuestion) command. The same command can be used during interactions between a digital assistant and a user, or you could use the Bot Ask and Answer (botAnswerQuestion) command.

  3. String output

    The knowledge base model finds the best answer and return it as a string output. You get this string output as the output parameters from Answer question (answerQuestion) command or the Bot Ask and Answer (botAnswerQuestion) command. These commands also returns other data for use, like alternative answers, if any, and the confidence score of the selected answer. You must program the script to use the output in its favor during the script's runtime.

Before you begin

You need to create a a knowledge base file, and a knowledge base model before you start using your model:

  1. Create a knowledge base file
  2. Create a knowledge base model


To use knowledge base models on your scripts, use the Answer Question (answerQuestion) command. If you are developing a chatbot script, you can use the Bot Ask and Answer (botAskAndAnswer) command.