exam questions

Exam AI-102 All Questions

View all questions & answers for the AI-102 exam

Exam AI-102 topic 3 question 8 discussion

Actual exam question from Microsoft's AI-102
Question #: 8
Topic #: 3
[All AI-102 Questions]

You are building an Azure WebJob that will create knowledge bases from an array of URLs.
You instantiate a QnAMakerClient object that has the relevant API keys and assign the object to a variable named client.
You need to develop a method to create the knowledge bases.
Which two actions should you include in the method? Each correct answer presents part of the solution.
NOTE: Each correct selection is worth one point.

  • A. Create a list of FileDTO objects that represents data from the WebJob.
  • B. Call the client.Knowledgebase.CreateAsync method.
  • C. Create a list of QnADTO objects that represents data from the WebJob.
  • D. Create a CreateKbDTO object.
Show Suggested Answer Hide Answer
Suggested Answer: BD 🗳️

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
czmiel24
Highly Voted 3 years, 3 months ago
It should be BD.
upvoted 34 times
SuperPetey
3 years, 3 months ago
Correct - see code example here: https://docs.microsoft.com/en-us/azure/cognitive-services/qnamaker/quickstarts/quickstart-sdk?tabs=v1%2Cversion-1&pivots=programming-language-csharp
upvoted 7 times
rdemontis
1 year, 1 month ago
agree with you. thank you for the provided documentation
upvoted 3 times
...
...
vominhtri854
3 years, 1 month ago
A knowledge base stores question and answer pairs for the CreateKbDTO object from three sources: - For editorial content, use the QnADTO object. To use metadata and follow-up prompts, use the editorial context, because this data is added at the individual QnA pair level. - For files, use the FileDTO object. The FileDTO includes the filename as well as the public URL to reach the file. - For URLs, use a list of strings to represent publicly available URLs. So I beleive A and C correct
upvoted 3 times
...
...
reachmymind
Highly Voted 2 years, 9 months ago
Answer :: B & D A. Create a list of FileDTO objects that represents data from the WebJob. NO - as it is from URL - so optional B. Call the client.Knowledgebase.CreateAsync method. YES - Mandatory to Call the Method C. Create a list of QnADTO objects that represents data from the WebJob. NO - as it is from URL - so optional D. Create a CreateKbDTO object. YES - Mandatory to Create Go through the lines starting line 92 at below URL: https://github.com/Azure-Samples/cognitive-services-qnamaker-csharp/blob/master/documentation-samples/quickstarts/Knowledgebase_Quickstart/Program.cs
upvoted 6 times
ninjia
2 years, 4 months ago
I agreed. You are building an Azure WebJob that will create knowledge bases from an array of ##URLs##. You could use FileDTO, QnADTO or urls to create the CreateKbDTO. Hence, FileDTO is not mandatory. Code snippet from the link provided by reachmymind: var createKbDto = new CreateKbDTO { Name = "QnA Maker FAQ from c# quickstart", QnaList = new List<QnADTO> { qna1 }, //Files = new List<FileDTO> { file1 }, Urls = urls };
upvoted 3 times
AzureJobsTillRetire
1 year, 9 months ago
DTO is data transfer object. You can use CreateKbDTO to create a knowledge base data transfer object that contains URLs and then call the client.Knowledgebase.CreateAsync method to create a knowledge base.
upvoted 1 times
...
...
...
HaraTadahisa
Most Recent 5 months, 3 weeks ago
Selected Answer: BD
I say this answer is B and D.
upvoted 2 times
...
reigenchimpo
6 months ago
Selected Answer: BD
BD is answer.
upvoted 2 times
...
nanaw770
6 months, 3 weeks ago
Selected Answer: BD
client.Knowledgebase.CreateAsync and CreateKbDTO.
upvoted 1 times
...
evangelist
9 months, 4 weeks ago
Selected Answer: BD
Create a CreateKbDTO object: First, you need to create a CreateKbDTO object, which contains the necessary information for creating a knowledge base, such as an array of URLs and the name of the knowledge base. Call the client.Knowledgebase.CreateAsync method: Then, use the Knowledgebase.CreateAsync method of the QnAMakerClient object, passing in the previously created CreateKbDTO object, to asynchronously create the knowledge base.
upvoted 2 times
...
rdemontis
1 year, 1 month ago
Selected Answer: BD
https://learn.microsoft.com/en-us/azure/ai-services/qnamaker/quickstarts/quickstart-sdk?tabs=v1%2Cversion-1&pivots=programming-language-csharp
upvoted 2 times
...
propanther
1 year, 1 month ago
It should be BD CreateKbDTO holds list of FileDto, QnADto. In given question, knowledge base accepts URLs which is one of the properties of FileDto. Hence, FileDtos will be created for each returned file URL from WebJob which can be used to create and hold within CreateKbDTO https://azuresdkdocs.blob.core.windows.net/$web/dotnet/Microsoft.Azure.CognitiveServices.Knowledge.QnAMaker/3.0.0-preview.1/api/Microsoft.Azure.CognitiveServices.Knowledge.QnAMaker.Models/Microsoft.Azure.CognitiveServices.Knowledge.QnAMaker.Models.CreateKbDTO.html
upvoted 1 times
...
katrang
1 year, 1 month ago
Selected Answer: BD
The client creates a knowledgebase from a CreateKbDTO object using the CreateAsync method. This object contains a list of FileDTOs and/or a list of QnADTOs. In this scenario we don't know which to use, but we definitely need the CreateAsync and the CreateKbDTO object.
upvoted 1 times
...
sl_mslconsulting
1 year, 2 months ago
Selected Answer: BD
You can not even create QnA Maker resource any more. Just read though the code, memorize the answers, and then move on.
upvoted 3 times
famco
3 months ago
Isn't it sad that we have to do this with our time? Why do people buy software from Microsoft
upvoted 1 times
...
...
nitz14
1 year, 5 months ago
Selected Answer: BD
ANSWER : B & D The options A and C are not necessary for creating knowledge bases using the QnAMakerClient object. They mention creating a list of FileDTO and QnADTO objects, which could potentially be used for populating the knowledge base with data, but they are not directly related to the process of creating the knowledge base itself.
upvoted 1 times
...
EliteAllen
1 year, 6 months ago
Selected Answer: BD
B. Call the client.Knowledgebase.CreateAsync method. D. Create a CreateKbDTO object. To create a knowledge base using the QnAMakerClient, you would need to create a CreateKbDTO object that contains the details of the knowledge base to be created. This object would include information such as the name of the knowledge base and the URLs of the documents to be included in the knowledge base. After creating the CreateKbDTO object, you would then call the client.Knowledgebase.CreateAsync method, passing in the CreateKbDTO object as a parameter. This method would create the knowledge base and return a response that includes the ID of the newly created knowledge base.
upvoted 1 times
...
SSJA
2 years ago
Selected Answer: BD
B & D is the correct answers.
upvoted 1 times
...
taer
2 years, 2 months ago
Selected Answer: BD
It should be BD.
upvoted 1 times
...
RamonKaus
2 years, 4 months ago
Selected Answer: BD
I agree with Eltooth & czmiel code from MS: var createOp = await client.Knowledgebase.CreateAsync(createKbDto); https://docs.microsoft.com/en-us/azure/cognitive-services/qnamaker/quickstarts/quickstart-sdk?tabs=v1%2Cversion-1&pivots=programming-language-csharp#create-a-knowledge-base
upvoted 2 times
...
Eltooth
2 years, 4 months ago
Selected Answer: BD
B and D are correct answers. https://docs.microsoft.com/en-us/azure/cognitive-services/qnamaker/quickstarts/quickstart-sdk?tabs=v1%2Cversion-1&pivots=programming-language-csharp#create-a-knowledge-base
upvoted 1 times
...
torekx
3 years, 1 month ago
should be bcd options based on https://docs.microsoft.com/en-us/azure/cognitive-services/qnamaker/quickstarts/quickstart-sdk?tabs=v1%2Cversion-1&pivots=programming-language-csharp#create-a-knowledge-base
upvoted 1 times
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...
exam
Someone Bought Contributor Access for:
SY0-701
London, 1 minute ago