AI-102 exam dumps

AI-102 practice question 283 of 493

Designing and Implementing a Microsoft Azure AI Solution. Professional level, Microsoft. Free question with the correct answer and a full explanation.

AI-102 Question 283

Select 3

You are developing a client application that needs to consume a pre-trained language model deployed in Azure. The application must send text input to the model and receive predictions in real-time. Which of the following steps are required to accomplish this?

  1. A

    Obtain the API endpoint and key from the deployed Azure resource.

  2. B

    Ensure the client application is hosted on Azure App Service.

  3. C

    Send an HTTP POST request to the API endpoint with the required headers and payload.

  4. D

    Install the Azure CLI on the client machine to interact with the language model.

  5. E

    Parse the JSON response received from the API to extract prediction results.

Show answer and explanation

Correct answers: A, C, E

Explanation

To consume a language model deployed in Azure, the client application must interact with the model's API. This requires obtaining the API endpoint and key, sending a properly formatted HTTP POST request containing the input text, and parsing the JSON response to extract the prediction output. Hosting the client application on Azure or using the Azure CLI is not required for this process.

  • A. Correct.

    Correct. To interact with the deployed language model, you need the API endpoint and key provided by Azure during deployment.

  • B. Incorrect.

    Incorrect. While hosting the client application on Azure App Service could be a valid choice, it is not a mandatory step to consume the language model from a client application. The client application can run from anywhere with network access to the API.

  • C. Correct.

    Correct. To send input to the language model, an HTTP POST request with proper headers (like the API key) and a payload containing the text input is required.

  • D. Incorrect.

    Incorrect. Installing the Azure CLI is not necessary for consuming a language model from a client application. The Azure CLI is typically used for managing Azure resources, not for direct API consumption.

  • E. Correct.

    Correct. The response from the language model's API will be in JSON format, and you need to parse this JSON to extract the prediction results.

Timed practice exam

Take a AI-102 practice test under exam conditions

40 questions in 120 minutes, drawn from this bank, with a score report and a per-question review when you finish.

Start timed exam