title | description | ms.service | manager | ms.author | author | ms.subservice | ms.topic | ms.date |
---|---|---|---|---|---|---|---|---|
Export knowledge bases - QnA Maker |
Exporting a knowledge base requires exporting from one knowledge base, then importing into another. |
azure-ai-language |
nitinme |
jboback |
jboback |
azure-ai-qna-maker |
how-to |
01/19/2024 |
You may want to create a copy of your knowledge base for several reasons:
- Copy a knowledge base from QnA Maker GA to Custom question answering
- To implement a backup and restore process
- Integrate with your CI/CD pipeline
- When you wish to move your data to different regions
[!INCLUDE Custom question answering]
- If you don't have an Azure subscription, create a free account before you begin.
- A QnA Maker resource created in the Azure portal. Remember your Microsoft Entra ID, Subscription, QnA resource name you selected when you created the resource.
- Set up a new QnA Maker service
-
Sign in to QnA Maker portal.
-
Select the knowledge base you want to move.
-
On the Settings page, you have the options to export QnAs, Synonyms, or Knowledge Base Replica. You can choose to download the data in .tsv/.xlsx.
- QnAs: When exporting QnAs, all QnA pairs (with questions, answers, metadata, follow-up prompts, and the data source names) are downloaded. The QnA IDs that are exported with the questions and answers may be used to update a specific QnA pair using the update API. The QnA ID for a specific QnA pair remains unchanged across multiple export operations.
- Synonyms: You can export Synonyms that have been added to the knowledge base.
- Knowledge Base Replica: If you want to download the entire knowledge base with synonyms and other settings, you can choose this option.
-
Select Create a knowledge base from the top menu of the qnamaker.ai portal and then create an empty knowledge base by not adding any URLs or files. Set the name of your choice for the new knowledge base and then Click Create your KB.
-
In this new knowledge base, open the Settings tab and under Import knowledge base select one of the following options: QnAs, Synonyms, or Knowledge Base Replica.
-
QnAs: This option imports all QnA pairs. The QnA pairs created in the new knowledge base shall have the same QnA ID as present in the exported file. You can refer SampleQnAs.xlsx, SampleQnAs.tsv to import QnAs.
-
Synonyms: This option can be used to import synonyms to the knowledge base. You can refer SampleSynonyms.xlsx, SampleSynonyms.tsv to import synonyms.
-
Knowledge Base Replica: This option can be used to import KB replica with QnAs, Synonyms and Settings. You can refer KBReplicaSampleExcel, KBReplicaSampleTSV for more details. If you also want to add unstructured content to the replica, refer CustomQnAKBReplicaSample.
Either QnAs or Unstructured content is required when importing replica. Unstructured documents are only valid for Custom question answering. Synonyms file is not mandatory when importing replica. Settings file is mandatory when importing replica.
Settings Update permitted when importing to QnA Maker KB? Update permitted when importing to Custom question answering KB? DefaultAnswerForKB No Yes EnableActiveLearning (True/False) Yes No EnableMultiTurnExtraction (True/False) Yes Yes DefaultAnswerforMultiturn Yes Yes Language No No
-
-
Test the new knowledge base using the Test panel. Learn how to test your knowledge base.
-
Publish the knowledge base and create a chat bot. Learn how to publish your knowledge base.
The export/import process is programmatically available using the following REST APIs:
Export
Import
There is no way to export chat logs, since the new knowledge base uses Application Insights for storing chat logs.
[!div class="nextstepaction"] Edit a knowledge base