Creating a knowledge base file
Learn how to create a knowledge base file to train a knowledge base model.
About this task
The file consists of text structured in three tables, each table in its respective spreadsheet. The file's inner structure must have three spreadsheets named: KB, Word, and Synonyms. The file name is not relevant.
Procedure
Use the following procedure to create a knowledge base file:
- Create a
.xlsx
file and open it. - Inside the file, create three spreadsheets named: KB, Word, and Synonyms.
- Click File > Save to save the file.
The following sections describes what content you must add inside each spreadsheet.
The KB spreadsheet
On the KB spreadsheet, insert the set of questions and answers of the knowledge base. The table you must define must have the following headers on row 1:
-
Question
The column containing the possible questions the machine learning model of the Knowledge Base must answer. -
Answer
The column containing the answers to the respective questions specified in the Question column at the same row. A question has only one answer, but answers can repeat. -
Context
The column containing the context label for the associated question. -
Tags
The column containing tags associated with the question. Tags are text triggers that guide the conversation intent between bot and user. The+
or the-
sign at the beginning of a tag increments or decrements a tag, respectively.
If you want to use contexts and tags, you need to manually program uses for them on your script. IBM RPA does not use contexts or tags that you define for any automatic function.
The Word spreadsheet
On the Word spreadsheet, insert words that the knowledge base model must not associate with any of its synonyms. The words in this spreadsheet are considered as proper nouns in the question. Capitalizing the words is not relevant. Add one word per row.
The Synonyms spreadsheet
On the Synonyms spreadsheet, insert the set of words and their respective synonyms that the model must consider when analyzing a question. You must separate word from its respective synonyms in two columns: the first column must be named Word and list all the words you want to add; the second column must be named Synonyms and list all synonyms for the specified word at the same row level. These column headers must be on row 1. Separate synonyms using semicolons. When you add words and synonyms to the Synonyms spreadsheet, the knowledge base model considers only the synonyms you set for the respective words.
If a word you define in this spreadsheet is also on the Word spreadsheet, then the Word spreadsheet has precedence and the word will be considered as a proper noun. See The Word spreadsheet for details.
Example:
Word | Synonyms |
---|---|
robot | bot;automation; |
What to do next
After creating the knowledge base file, you can publish the file to the server using IBM RPA Studio. For more information on how to publish the file, check out Creating a Knowledge Base model.