AI-102 Question 279
Select 3You are developing a client application that needs to consume a pre-trained Azure OpenAI language model to provide text summarization capabilities. Which steps should you take to integrate the language model with your application?
- A
Create an Azure OpenAI resource, obtain the endpoint and key, and make API calls to the language model using the REST API.
- B
Install the Azure SDK for Python and use the OpenAIClient class to interact with the language model.
- C
Directly embed the language model into your application by downloading it from the Azure portal.
- D
Configure the Azure OpenAI resource to enable authentication using Azure Active Directory (Azure AD).
- E
Write a custom machine learning model to replicate the functionality of the Azure OpenAI model.
Show answer and explanation
Correct answers: A, B, D
Explanation
To consume an Azure OpenAI language model from a client application, you need to create an Azure OpenAI resource, authenticate using an API key or Azure AD, and interact with the model either through the REST API or an SDK like the Azure SDK for Python. Directly downloading the model or writing a custom model is not applicable in this scenario.
- A. Correct.
This is correct. Consuming Azure OpenAI requires creating a resource in the Azure portal, obtaining the endpoint and access key, and making API calls to the model via the REST API.
- B. Correct.
This is correct. Using the Azure SDK for Python, specifically the OpenAIClient class, is a supported approach to interact programmatically with Azure OpenAI models.
- C. Incorrect.
This is incorrect. Azure OpenAI models cannot be downloaded or embedded directly into applications. They are consumed as a service through API calls.
- D. Correct.
This is correct. Configuring Azure AD authentication can be used as an alternative to using API keys for securing access to the Azure OpenAI resource.
- E. Incorrect.
This is incorrect. Writing a custom machine learning model is unnecessary and inefficient when leveraging the pre-trained Azure OpenAI language models.