Azure QnA Maker API Documentation

Create Knowledge Base Using REST API and cURL

Question

You plan to use Azure QnA maker service to create a knowledge base (KB)

It is assumed that you have an active Azure subscription.

You have created a Stable QnA service, you have the QnA maker resource name and QnA maker resource key.

To create a knowledge base using REST API and cURL, what additional information would you need.

(select two answer choices)

Answers

Explanations

Click on the arrows to vote for the correct answer

A. B. C. D.

Correct Answers: A and D.

Option A is correct because JSON name and url are required describing the knowledge base.

Here is a code snippet for creating a knowledge base using REST API and cURL:

Option B is incorrect because Knowledge Base Id is used to check the status of the KB operation.

Option C is incorrect because Operation Id is used while publishing the knowledge base.

Option D is correct because Size of the JSON is required while creating a KB using QnA maker.

To learn more about creating knowledge base using REST API and cURL, use the link given below:

To create a knowledge base using the Azure QnA maker service REST API and cURL, you would need to provide the following information:

  1. Knowledge Base Id: This is a unique identifier for the knowledge base you want to create. You can obtain this ID by either creating a new knowledge base using the Azure portal or by using the QnA maker API to retrieve a list of existing knowledge bases. You will need to include this ID in your API calls to specify which knowledge base you want to modify or retrieve.

  2. JSON describing the Knowledge Base: This is a JSON file that contains the information about the knowledge base you want to create. The JSON file should include details such as the name of the knowledge base, the language it will support, and the Q&A pairs that will be included in the knowledge base. You can create this file using any text editor or JSON editor, and then use cURL to upload the file to the QnA maker service.

In addition to the above two pieces of information, there are two other items you may need to consider:

  1. Operation Id: When you create or modify a knowledge base using the QnA maker API, the service returns an operation ID that you can use to track the progress of the operation. This ID is returned in the response body of the API call, and you can use it to check the status of the operation using the Get Operation Details API.

  2. Size of the JSON: The size of the JSON file that you upload to the QnA maker service is limited to 4 MB. If your JSON file is larger than this, you may need to split it into smaller files or consider using other methods to upload your knowledge base data.

Overall, to create a knowledge base using the QnA maker service REST API and cURL, you will need to provide the Knowledge Base Id and a JSON file describing the knowledge base.