Muokkaa

Jaa


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

Note

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

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.

    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