AI-102 exam dumps

AI-102 practice question 280 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 280

Select 3

You are developing a client application that interacts with an Azure OpenAI language model to generate customer support responses. You need to ensure the application can send prompt data and receive responses securely and efficiently. Which steps should you perform to consume the language model from your application?

  1. A

    Obtain an API key from the Azure OpenAI resource and include it in the Authorization header of your HTTP requests.

  2. B

    Deploy the model to an Azure Kubernetes Service (AKS) cluster to enable secure communication.

  3. C

    Use the Azure OpenAI REST API's endpoint URL to send POST requests with prompt data in JSON format.

  4. D

    Enable the Azure OpenAI resource's Managed Identity to bypass the need for an API key.

  5. E

    Validate and sanitize input data before sending it to the language model to prevent injection attacks.

Show answer and explanation

Correct answers: A, C, E

Explanation

To consume a language model from a client application, you must authenticate using an API key, send properly formatted POST requests to the Azure OpenAI REST API endpoint, and ensure input data is sanitized to prevent security risks. Deploying the model to AKS or relying on Managed Identity is unnecessary for using the Azure OpenAI service.

  • A. Correct.

    Correct. An API key is required to authenticate requests to the Azure OpenAI service. It must be included in the Authorization header of your HTTP requests.

  • B. Incorrect.

    Incorrect. Deploying the model to an AKS cluster is not required for consuming the Azure OpenAI language model. The model is hosted and managed by Azure automatically.

  • C. Correct.

    Correct. The Azure OpenAI REST API allows you to interact with the language model by sending POST requests to the endpoint URL with the necessary prompt data in JSON format.

  • D. Incorrect.

    Incorrect. While Managed Identity is a feature in Azure, it is not currently used to authenticate requests to the Azure OpenAI service. Authentication requires an API key.

  • E. Correct.

    Correct. Validating and sanitizing input data is a best practice to prevent security vulnerabilities, such as injection attacks, when interacting with any API.

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