Train Knowledge Base

Trains a Knowledge Base model using the contents of a file stored on the computer.

Command availability: IBM RPA on Red Hat® OpenShift® Container Platform, IBM RPA on premises, and IBM RPA SaaS

Script syntax

trainKB --file(String) [--version(Nullable<MachineLearningAlgorithm>)] [--options(Nullable<AnswerQuestionOptions>)] --culture(Culture) --name(String) [--production(Boolean)] (Numeric)=value

Input parameter

The following table displays the list of input parameters available in this command. In the table, you can see the parameter name when working in IBM RPA Studio's Script mode and its Designer mode equivalent label.

Designer mode label Script mode name Required Accepted variable types Description
File file Required Text Full path to the file with the content to train the Knowledge Base.
Version version Optional MachineLearningAlgorithm The target Knowledge Base version that should be trained with the content of File.
Options options Optional AnswerQuestionOptions Additional options. Select the Use Synonyms option to use the synonyms defined in the knowledge base file.
Language culture Required Culture Language in which the content of File is written.
Name name Required Text Name that is assigned to the Knowledge Base that should be trained.
Mark As Production production Optional Boolean Marks the trained Knowledge Base as production.

version parameter options

The following table displays the options available for the version input parameter. The table shows the options available when working in Script mode and the equivalent label in the Designer mode.

Designer mode label Script mode name Description
Knowledge Base KnowledgeBase The first version of the proprietary algorithm to train the knowledge base model. Does not consider synonyms.
Knowledge Base V2 KnowledgeBaseV2 The second version of the proprietary algorithm to train the knowledge base model. Does consider synonyms.

language parameter options

The following table displays the options available for the language input parameter. The table shows the options available when working in Script mode and the equivalent label in the Designer mode.

Designer mode label Script mode name Description
en-US en-US en-US is the selected language.
pt-BR pt-BR pt-BR is the selected language.
pt-PT pt-PT pt-PT is the selected language.

Output parameter

Designer mode label Script mode name Accepted variable types Description
Version value Number Returns the current version of the Knowledge Base.

Example

The command selects a file with content to train a Knowledge Base named "tableKnowledgeBaseExample".

defVar --name version --type Numeric
trainKB --file "tableKnowledgeBaseExample.xlsx" --version "KnowledgeBase" --culture en-US --name exampleKnowledgeBase version=value
logMessage --message "${version}" --type "Info"