Skip to content

Latest commit

 

History

History
87 lines (61 loc) · 5.25 KB

export-knowledge-base.md

File metadata and controls

87 lines (61 loc) · 5.25 KB
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

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

[!INCLUDE Custom question answering]

Prerequisites

Export a knowledge base

  1. Sign in to QnA Maker portal.

  2. Select the knowledge base you want to move.

  3. 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.

    1. 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.
    2. Synonyms: You can export Synonyms that have been added to the knowledge base.
    3. 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

  1. 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.

  2. 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.

    1. 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.

    2. Synonyms: This option can be used to import synonyms to the knowledge base. You can refer SampleSynonyms.xlsx, SampleSynonyms.tsv to import synonyms.

    3. 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
  3. Test the new knowledge base using the Test panel. Learn how to test your knowledge base.

  4. Publish the knowledge base and create a chat bot. Learn how to publish your knowledge base.

    [!div class="mx-imgBorder"] Migrate knowledge base

Programmatically export a knowledge base from QnA Maker

The export/import process is programmatically available using the following REST APIs:

Export

Import

Chat logs

There is no way to export chat logs, since the new knowledge base uses Application Insights for storing chat logs.

Next steps

[!div class="nextstepaction"] Edit a knowledge base