AI-102 Question 451
Select 2You are building an Azure-based application that uses OpenAI's Codex model to generate Python code snippets based on user-provided prompts. You want to ensure the prompts are submitted securely and that the responses are parsed effectively in your application. Which steps should you include in your implementation?
- A
Use Azure OpenAI Service to submit prompts and retrieve responses.
- B
Encrypt the user prompts before sending them to the Codex model.
- C
Parse the response from the Codex model directly without validation.
- D
Use role-based access control (RBAC) to restrict access to the Azure OpenAI resource.
- E
Store the Codex model responses in plain text for debugging purposes.
Show answer and explanation
Correct answers: A, D
Explanation
To securely and effectively use the OpenAI Codex model via Azure OpenAI Service, it is essential to leverage Azure's built-in features, such as secure communication and RBAC, to manage access. Submitting prompts through Azure OpenAI Service ensures reliability, while RBAC restricts unauthorized access. It is also critical to validate and handle responses securely to prevent potential risks during implementation.
- A. Correct.
Correct: Azure OpenAI Service is used to interact with OpenAI models such as Codex securely and efficiently within the Azure ecosystem.
- B. Incorrect.
Incorrect: While security is crucial, encrypting the prompts is unnecessary as the Azure OpenAI Service already uses secure communication protocols (e.g., HTTPS).
- C. Incorrect.
Incorrect: Validating and sanitizing the response is essential to prevent errors or security vulnerabilities in your application.
- D. Correct.
Correct: Role-based access control (RBAC) ensures only authorized users and services can access the Azure OpenAI resource, enhancing security.
- E. Incorrect.
Incorrect: Storing responses in plain text can lead to security risks, such as exposing sensitive information.