Move a knowledge base using export-import
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
The QnA Maker service is being retired on the 31st of March, 2025. A newer version of the question and answering capability is now available as part of Azure Cognitive Service for Language. For question answering capabilities within the Language Service, see question answering. Starting 1st October, 2022 you won’t be able to create new QnA Maker resources. For information on migrating existing QnA Maker knowledge bases to question answering, consult the migration guide.
- 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 Azure Active Directory ID, Subscription, QnA resource name you selected when you created the resource.
- Set up a new QnA Maker service
Export a knowledge base
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.
Import a knowledge base
Click 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 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.
Programmatically export a knowledge base from QnA Maker
The export/import process is programmatically available using the following REST APIs:
There is no way to export chat logs, since the new knowledge base uses Application Insights for storing chat logs.
Submit and view feedback for