When to use the questions and answers skill
The question and answer skill can be used when:
When you have static information - Use this skill when you have static information in your knowledge base of answers. This knowledge base is custom to your needs, which you've built with documents such as PDFs and URLs.
When you want to provide the same answer to a request, question, or command - when different users submit the same question, the same answer is returned.
When you want to manage a Virtual Assistant conversation that includes static information - your knowledge base takes a user's conversational text or command and answers it. If the answer is part of a pre-determined conversation flow, represented in your knowledge base with multi-turn context, the Virtual Assistant can easily provide this flow.
How do I phrase a question?
A good question is concise.
Good answers are probably longer. When making questions try to avoid words that are not really a part of the subject. For instance, let's consider the question:
"I'm traveling to the Tenjin office in London, what's the parking like?"
This is not a good question. This would be better expressed as several phrases.
"Where can I park at the London Office?"
"How is car parking in London?"
The phrases do not mention travel, as it is not the subject of the answer. They also do not include the name 'Tenjin' because the whole knowledge base is probably about Tenjin. Different phrases avoid all having the word 'office' in them.
What is alternative phrasing?
You should generally have at least one alternative phrasing for a question. An alternative phrasing is the same question phrased in a different way.
Having alternative phrases increases the chance that when a user types in a phrase that is not an exact match to a question, the knowledge base still finds the correct answer anyway.
At a minimum, you should have a conversational question and a search term question. For example, a conversational question might be 'Where can I park at Biomni?' and the search terms could be 'Parking' and 'car park'.
You should avoid having a series of repetitive questions. So for example many questions of the form 'where is the <....> location' will not produce good results, because 'where' and 'location' now appear in many questions and do not help distinguish between questions.
What is follow-on prompts?
Follow-on prompts will be shown to the user along with the answer. They are suggestions for what the user could 'say' back to the assistant and should be in the user's voice. It can help to think of them as text that the user might type as part of the conversation.
Follow-on prompts can be used to build a conversation structure. So for example, if the question was 'Where can I park?' with the answer 'Which office are you visiting?', the follow on prompts could be 'London' or 'Manchester'. These prompts would point to the answers for 'Where can I park in London' and 'Where can I park in Manchester'. The text of Follow-on prompts does not have to match the text of a question.
What are follow-on only?
A follow-on only question can only be reached as a follow-on prompt from a previous answer. A follow-on only question will never be returned from a direct query by the user.
In practice, you should not need to use follow-on only questions very often. This is because in most cases the follow-on question is usually the answer to a more specific question that could be asked directly.
So for example you may be building a conversation flow:
Q: 'Where can I park?' A: 'Which office are you visiting' Follow on prompts: London, Manchester Q: 'London' A: 'You can get a permit at the front desk'
So in this example, you may be tempted to make 'London' be a follow-on only question since it follows on from the previous answer about where can I park. However, it is in fact the answer to the more specific question 'Where can I park in the Biomni London office?', and so should just be a normal question.
What are suggestions?
If a question gets asked a lot, and it does not have a good answer, the system will make it a 'suggestion'. The system will make its best guess about which answer to the question should be assigned to. It will generally not be sure about this and will suggest several answers as a possible home for the question.
You should look at the suggestions, and if one of the answers is a good match add it as a question for the answer. If none of the answers is a good match for the question, you should add it as a new question and fill in a suitable answer.
How do I test the knowledge base?
It is really important to test your knowledge base. There are two aspects to testing:
Do I find the right answer when I ask the assistant a question?
Does the answer display well?
Sometimes a question does not produce the answer you want. This is generally because the text typed in does not match well enough to a question in the knowledge base. The best way to solve this issue is to add alternative phrases for the question.
You can test the match of a query to a knowledge base question either in the assistant directly, or if you want more detail using the Query functionality in the knowledge base screen.
A quick way to check the display of the answers is using Test Assistant on the assistant screen. This lets you see the assistant's output as if you were a user in a web chat. If your users will be using a different channel, such as Microsoft Teams, you should also check there. Develop a set of questions that will produce all of the answers in the knowledge base, and work through them checking that the results look good.
Why is the correct answer not shown when I chat with the assistant?
Someone talking to an assistant probably uses different phrasing and language to the questions in the knowledge base.
Try the question in the Query function within the knowledge base. Is its match threshold high enough to be shown? Or are other questions matching higher?
If the desired answer is matching badly, consider adding the question asked as alternative phrasing, or add a keyword. Also, consider improving the phrasing to get a better match.
If an undesired answer is matching higher than the desired one, can you make the undesired response more specific by removing terms that are not strictly its subject matter. Also make sure it is in the form of a question, as otherwise it may be matched as a search term.
What is the query button for?
The query button lets you query the knowledge base with the same natural language processing that the assistant uses.
The assistant will not show the result of a query unless the score exceeds the match threshold. The query dialog shows the score for a query, the match threshold, and whether it would be included in the assistant's results.
Often an expected result is not shown in the assistant because its score does not exceed the match threshold. You can use the Query dialog to check if this is the case. If you do not get a good match to your question, consider adding it as an alternative to phrasing the correct answer.
What is markdown?
The answers are written in a format called Markdown. Markdown allows you to style text with heading, bullet points, italics, etc. Markdown display can vary between different clients, so for example it can look slightly different when you view it in Microsoft Teams, compared to when you view it in WebChat. You need to test the knowledge base in the client you are targeting, to confirm that you are happy with how it looks. Here are some links about markdown:
How can I do a staged deployment to production?
Sometimes you want to make changes to a knowledge base, but do not want end users to see changes until all the work is completed. You can do this with two assistants:
- Production Assistant - which the end users are using.
- Test Assistant - where you work to expand and test the knowledge base.
Make your changes on the Test Assistant. Tweak the knowledge base testing as you go along. When you are happy the work is complete, use the backup and restore knowledge base functionality to move the updated knowledge base onto the production assistant.
How do I move a knowledge base between assistants?
You can move a knowledge base between different assistants using the backup and restore functionality:
On the skill page, select the 'Backup to file' option.
The knowledge base will be exported to a file and saved onto your local machine
Navigate to the new assistant where you want to import the knowledge base.
On the new assistant, select 'Restore from file', and select the exported file
The knowledge base will be imported.
Note that any existing questions and answers will be removed.
Can I import a knowledge base from a website or a document?
You can make a new knowledge base by importing from a document or a website. This provides a quick way to get existing data into a knowledge base. However, web pages and documents are much more complex than knowledge bases and may require work to correct afterward. In particular, you will need to adjust the formatting of the answers, to get them to display well in the assistant. Additionally, you will probably need to adjust the phrasing of the questions and add alternative questions for the knowledge base to work well.