Knowledge Base

What is the Knowledge Base?

The Knowledge Base is essentially an answer library that Ezra uses to create responses. The Knowledge Base lets you choose what Ezra will answer with and how.

Ezra finds answers by matching words it finds in the dictionary to what is being typed (these words are called tags) and then checking that against what is tagged in the Knowledge Base.

step 1

How do I add a new answer to the Knowledge Base?

Click New Entry. A highlighted row will appear at the top of the list.

Select a Category from the drop down list. This can help to define the answer for reporting and filtering purposes.


Select a Context from the drop down list. Contexts are used to inform Ezra what kind of answer it will return. For example, when you choose ‘Selection’, the answer should be designed around returning a selection of information to the user. A link option would push a user to a site straight away. If unsure, ‘Selection’ will generally be your default Context.


Resource URL/Connection:

You can enter a link to a resource here or respond with an Action Flow you have created. Links are used more commonly and are generally to a website or database server.


Query Body:

Ezra allows you to return information straight from a SQL database.

Enter the SQL statement here.


In the example above, these are the details for the people you have selected: {{name}}, {{phone}}, {{email}}.


Enter the answer you want Ezra to return to the user here. These can be simple text responses, or responses with your SQL query/URL results embedded as tokens: {{name}}, {{phone}}, {{email}}. For more information on setting up tokens, visit the Using Tokens page.


You must add tags to the answer to help Ezra match and find the most relevant response to an enquiry. Ezra will return the most relevant response by the number of tags it matches, so when adding tags within the Knowledge Base, be clear about which tags will have the most impact for the question asked. Keep in mind not to overdo the amount of tags, because that can negatively impact Ezra’s scoring system, which also takes into account non-matches.

Click on the Tags button


This is the window that will appear.

tags 1

Click on Add Or Tag or Add And Block to start adding tags - we will explain more about the two types of tags, AND/OR, below. Alternatively you can click the ‘+’ icons to add more tags.

Select the Type from the drop down list.

Select a Word/Phrase from the drop down list.

Add as many tags as needed.

Click Save.

Note: All words in the drop down lists are from the Dictionary word/phrase list. If you cannot find a type, word, or phrase, you will need to add it into the Dictionary before it will appear in the drop down list here to be selected.

What is an OR tag?

If you define an ‘OR’ tag, Ezra will look through the utterance to see if it can match any words to the tags in the Knowledge Base answer list.

For example, in the case below (see screenshot), it will go through and say: does the utterance match the book tag OR the register tag OR the training tag of this answer?

If it does then Ezra will return the content of the best matched answer from Knowledge Base to the asker.

If it doesn’t match any of the tags of a particular answer then Ezra will continue to search through Knowledge Base for the best matched answer.

OR tag

What is an AND block?

An ‘AND’ block is shown with an orange line against it’s words/phrase. This means that in order for Ezra to return a specific answer, the utterance will have all of the tags in the AND block.

Using the screenshot example below, Ezra will consider: does the utterance match the what tag AND the are tag AND the you tag of this answer?

If it does then Ezra will return the content of the answer to the asker.

If it doesn’t match all of the tags within the block then Ezra will not return that particular answer and will continue to search through Knowledge Base for another best matched answer.

AND tag

How do I edit an existing answer from Knowledge Base?

Click on the entry you want to edit.

Click on the field that you want to edit.

Make the necessary changes.

Click out of the entry.


How do I delete an answer from Knowledge Base?

To delete an answer, first remove all tags that are assigned to the answer.

Once the tags have been removed, the entry will now be highlight and there will be an ‘X’ visible at the end of the row.

Click the ‘X’ to delete the answer.

step 5

How do I delete a tag?

To delete a tag, first click the Tags button, then click ‘x’, next to the desired tag in the edit window.


How does Ezra score tags?

When scoring, Ezra matches the words used in the question to the words that you have tagged from the Dictionary, and produces an answer that has the highest score. Every time Ezra finds a word, a point is given. The answer with the highest matched score to the user’s question is returned. If there are a lot of tags against a possible response, a point is deducted for every word that Ezra doesn’t find a matching tag for. This highlights the importance of keeping tags simple, clear, and impactful to what you anticipate the user may ask. If you would like a deeper understanding of how Ezra scores tags, refer to the algorithm below.

Note: this is quite technical, and not necessary knowledge when first building Ezra.


TM = tags matched, TD = Tags don’t match, n = number of tags


{{What }} is the {office} {extension} for John Smith?

Ezra calculation:


What, office, sit = 2 - (1/3) x 1 = 1.67


What, extension = 2 - (1/2) x 0 = 2

Ezra returns Phone response.

As you can see in the above example, a user is asking Ezra, “What is the office extension for John Smith?” Now, if we looked into our imaginary Knowledge Base, we can see two possible answers that Ezra will look to a response to, based on the words in the question.

These are;

• Location: with the tags ‘what’, ‘office’ and ‘sit’

• Phone: with the tags ‘what’ and ‘extension’

As the user asked a question that tags to both of these answers, Ezra needs to score them so it can respond with what it sees as the most appropriate answer. If we match the tags to the question, we can see that each possible response has two matched tags, so this should score the same. However, Ezra also looks to see how many tags were matched in the question asked vs the possible tags against the response in the Knowledge Base.

As the Location response has 2 out of 3 matched vs the Phone which has 2 out of 2 matched, Ezra uses the formula to choose Phone as the more ‘perfect’ match overall. Note that if two or more possible answers have the same score, Ezra will return all of them in its response.

While the above is a simple example, you can use the formula to work out how Ezra will score possible questions/answers for cases with any number of tags as your Knowledge Base becomes more complex.

Tip: Keeping this formula front of mind is good design practice when building and adding to your Knowledge Base going forward.

How do I upload a TSV file?

The existing UI is the easiest tool to use when building the Knowledge Base. The purpose of the TSV download and upload function is therefore slightly different to the Dictionary. Regarding the Knowledge Base, TSV is more commonly used for backing up data, or providing Perspective ILM with your data if there is an issue that you can’t work out, and Ezra is not responding correctly. Although it is possible to build your Knowledge Base through uploading Excel.tsv files, we do not encourage it due to potential Scoring conflicts, and keeping with good response design practice - even for a large number of answers.

Click Upload TSV.


Click Choose File to browse your computer for the desired file.


A progress bar will inform you as to what percentage of the upload has been successfully completed so far.



To download, simply hit “Download TSV”.

If you do want to prepare your own TSV file to upload a bulk of new answers, please make sure your columns have the following titles:

Category (Subject, Greeting, Person etc)

Answers (the free text or Content field where you write the exact wording of the answer Ezra will give)

Context (Selection, Page, Link, Endpoint, Query)

Tags (the Dictionary words you are tagging the answer with, please see the screenshot below for an example, as this needs to be written in a specific way to highlight the word type and the AND/OR tag sets)

Resource URL (if applicable - this column can be blank aside from the heading if needed)

Query Body (where you enter your SQL query if you are pulling answers from a database. This can also remain empty with just a column heading if appropriate.)

When entering in the Tags column, there are a few things to keep in mind. Use the first letter of the word type (Noun, Query, Verb etc) followed by a colon before writing in the tag word. For AND tag sets, use an ampersand between tags. For example:

tag set example

If you are unsure as to how to format your TSV file when uploading for the first time, you can download the current Knowledge Base inputs as reference data. Make sure to delete the downloaded information and instead add your new answers though, to avoid duplicates.

IMPORTANT: Make sure to delete the downloaded information and instead add only your new answers to the upload. This will avoid duplication in the system and with Ezra’s responses.

Note: If editing/viewing TSV with Excel, there might be an initial set up process in order to set Excel as the default program for opening .tsv files.

If you cannot view your downloaded Knowledge Base TSV files in Excel, follow the steps below.

Locate the TSV file you wish to open. Right-click and select “Open with”. If Excel does not show up as an option, click “Choose another app”.


Make sure you check the box next to “Always use this app..”. If you can’t see Excel as an option here, click “More apps”.


If there is still no option to select Excel, click “Look for another app on this PC”.


This will take you to a File Explorer window. Click “This PC” and then search for Excel.


You will now be able to open your Ezra Dictionary .tsv file in Excel, and Excel will be the default for opening all .tsv files in the future.