As part of the exam AI-102 designing and implementing a Microsoft Azure AI solution, one potential task you may find yourself faced with is the ability to export a knowledge base. This process involves saving your QnA Maker knowledge base in a format that can then be transported or imported to other platforms or services.
I will provide you with a step-by-step guide on how to successfully export a knowledge base in Microsoft QnA Maker. However, before we dive into the steps, it’s important to have a clear understanding of what a knowledge base is and what it means to export it.
Understanding a Knowledge Base
A Knowledge Base in the context of Azure AI, particularly QnA Maker, is a repository of questions and their corresponding answers created, edited, and trained using QnA Maker portal by the developers. The Knowledge Base (KB) can be used across various Azure services such as chatbots and virtual assistants.
What It Means to Export a Knowledge Base
Exporting a Knowledge Base refers to the process of downloading the knowledge base data in file format from QnA Maker. This data primarily contains a structured set of question-and-answer pairs known as the QnA pairs and other metadata. The exported file will be in JSON format which is easily understandable and portable for machine learning and artificial intelligence models.
Exporting a knowledge base is a critical task when it comes to sharing KBs across different projects and services, data backups and recovery, or when transitioning services.
How to Export a Knowledge Base
Follow these steps to export a Knowledge Base from the QnA maker portal:
- Go to the QnA Maker portal.
- Sign in using your Azure credentials.
- Navigate to ‘My Knowledge Bases’ and select the Knowledge Base you desire to export.
- Once you are in the Knowledge Base screen, click on the ‘Settings’ tab.
- On the Settings page, you’ll find the ‘Export Knowledge Base’ button at the top of the page. Click on it.
- The Knowledge base will be exported to a .json formatted file. Save this file on your local machine or elsewhere as per your requirement.
It is crucial to save this data securely as it likely contains sensitive and critical information about your project or service.
At a glance, these are the five steps involved in exporting a knowledge base with QnA Maker:
Step | Description |
---|---|
1 | Visit the QnA Maker portal and sign in. |
2 | Navigate to ‘My Knowledge Bases’. |
3 | Choose the desired Knowledge Base. |
4 | Click on ‘Settings’. |
5 | Click ‘Export Knowledge base’ and save the file. |
Conclusion
Exporting a knowledge base in the QnA Maker is a straightforward process that allows for secure and efficient transportation of knowledge bases across various platforms and services. Understanding how to export a knowledge base is crucial for any developer or professional preparing for the AI-102 Designing and Implementing a Microsoft Azure AI Solution exam. To effectively learn and implement Azure AI solutions, always remember to utilize reliable documentation and resources.
Practice Test
True/False: In Azure, you can only export a knowledge base in English.
- True
- False
Answer: False
Explanation: Azure allows you to export a knowledge base in various languages. The language selection for the export depends on the configuration setting of the created knowledge base.
The two main methods available for exporting a knowledge base in Azure are;
- a. Graph API
- b. By using PowerShell
- c. Using QnA Maker portal
- d. All of the above
Answer: d. All of the above
Explanation: Azure permits the export of a knowledge base using Graph API, PowerShell, or directly through QnA Maker management portal.
True/False: The export function in Azure doesn’t include any metadata.
- True
- False
Answer: False
Explanation: Azure’s export function does include all metadata like urls and files from which the QnA were extracted, filters and more.
When considering all the exportable formats through Azure, which of the following formats is correct?
- a. CSV
- b. JSON
- c. TXT
- d. XML
Answer: b. JSON
Explanation: When a knowledge base is exported through Azure, it is exported in a JSON format that includes all data and metadata.
True/False: It is impossible to export an entire resource group in Azure.
- True
- False
Answer: False
Explanation: It is indeed possible to export an entire resource group in Azure as a template which can be used later for deployment.
In Azure, which operation can you perform to extract content from the knowledge base?
- a. Import operation
- b. Export operation
- c. Delete operation
- d. Save operation
Answer: b. Export operation
Explanation: The export operation is used in Azure to extract content from the knowledge base which include the question-answer pairs, URLs from which the QnA pairs were extracted, files from which the QnA pairs were extracted, and more.
True/False: It is possible to export multiple knowledge bases at the same time in Azure.
- True
- False
Answer: False
Explanation: In Azure, you must export each knowledge base separately. It does not support the exporting of multiple knowledge bases simultaneously.
True/False: Knowledge base exporting in Azure always requires administrative rights.
- True
- False
Answer: False
Explanation: While some activities related to managing a knowledge base require administrative rights, exporting the knowledge base can be performed with basic user rights.
In Azure, you can export a knowledge base to the specific file formats below, except?
- a. TXT
- b. PDF
- c. DOCX
- d. None of the above
Answer: d. None of the above
Explanation: Currently, Azure only supports exporting a knowledge base in a JSON format.
True/False: It is possible to export a knowledge base that is in a published status in Azure.
- True
- False
Answer: True
Explanation: In Azure, a knowledge base can be exported regardless of whether it’s in a published or draft status.
What should you do if you export a knowledge base and can’t find it?
- a. Use the Disk Cleanup tool
- b. Check your Downloads folder
- c. Refresh your browser
- d. All of the above
Answer: b. Check your Downloads folder
Explanation: When you export a knowledge base in Azure, it gets downloaded as a .JSON file in your Downloads folder.
True/False: Part of the data that can be exported from Azure AI includes the Postman collection for the current KB.
- True
- False
Answer: True
Explanation: Azure includes the Postman collection request/response pairs, as part of the data you can export from the knowledge base.
Interview Questions
What is the primary purpose of exporting a knowledge base in AI solution design?
Exporting a knowledge base in AI solution design primarily serves the purpose of creating a backup, sharing the knowledge base across other services, or moving the knowledge base to a different tenant. It provides flexibility and control over the data stored in the knowledge base.
How can Azure QnA Maker be used to export a knowledge base?
In Azure QnA Maker, the user can export a knowledge base through the QnA Maker portal itself. In the portal, there is an option in the settings to ‘Export knowledge base’. The base will then be exported in a .tsv (tab-separated values) file.
What format does an exported knowledge base from QnA Maker typically comes in?
An exported knowledge base from Azure QnA Maker typically comes in a .tsv (tab-separated values) file format.
Does exporting a knowledge base in Azure include any personal identifiable information?
No, exporting a knowledge base in Azure does not include any personal identifiable information. It only includes the QnA pairs, metadata, and any relevant settings saved in the knowledge base.
Is it possible to import an exported knowledge base into a new QnA Maker service?
Yes, it is indeed possible to import an exported knowledge base into a new QnA Maker service. The exported .tsv file can be used to populate the new QnA Maker service.
What happens to the old knowledge base when you export it?
When a knowledge base is exported, it simply creates a copy in a .tsv file and does not affect or delete the original knowledge base. The original knowledge base remains intact in the QnA Maker service.
Can anyone export a knowledge base from Azure QnA Maker?
Only an Admin or a Co-admin has the right to export a knowledge base from Azure QnA Maker.
Can knowledge bases be automatically exported on a schedule in Azure QnA Maker?
No, Azure QnA Maker does not support automatic or scheduled exports of knowledge bases. The export process must be manually initiated by a user.
What information does the .tsv file contain when a knowledge base is exported from Azure QnA Maker?
The .tsv file contains information such as question-answer pairs, metadata and follow-up prompts associated with the knowledge base in Azure QnA Maker.
Is Microsoft responsible for the content of an exported knowledge base?
Microsoft is not responsible for the content of an exported knowledge base. The owner of the Azure subscription is solely responsible for the content of the knowledge base.
Can you export a knowledge base from QnA Maker to an application based on Chatbot?
Yes, you can export a knowledge base from QnA Maker and import it into an application based on a Chatbot, using the .tsv file that was generated during the export process.
Is it possible to share an exported knowledge base directly with another Azure user?
It’s not possible to share an exported knowledge base directly within Azure. However, you can share the .tsv file generated after export with any user who can then import it into their own QnA Maker service.
Is it possible to edit the .tsv file of an exported knowledge base?
Yes, it’s possible to edit a .tsv file of an exported knowledge base. You can add, delete or modify the QnA pairs according to your needs.
What happens if there are changes to QnA pairs in the Knowledge base after the .tsv file has been exported?
If there are any changes to the QnA pairs in the Knowledge base after the .tsv file has been exported, the changes will not be reflected in the previously exported .tsv file. You would have to export the knowledge base again to include recent changes.
Can I export a knowledge base from one language to another in QnA Maker?
No, QnA Maker does not support automatic translation during export. The knowledge base will be exported in its original language only.