
AI-102 EXAM QUESTIONS 2024 MICROSOFT AZURE AI 102 CERTIFICATION COURSE PART-11
AI Summary
This video continues an AI question series, focusing on questions 91 through 100, which are relevant for 2024 examinations.
Question 91 addresses building a chatbot using OpenAI Studio where responses need to be deterministic and less creative. The two parameters to configure for this are temperature and top_p. Temperature controls the randomness, creativity, or repetitiveness of responses; lower temperatures result in more predictable and consistent output, while higher temperatures make it more creative. Top_p similarly controls randomness but uses a different method, narrowing the model's token selection to more likely tokens when lowered. It's important to adjust either temperature or top_p, but not both simultaneously. Max response sets a limit on tokens per response. Stop sequence defines points where the model should stop generating text. Frequency penalty reduces the chances of the model repeating the same words or phrases. Presence penalty reduces the chance of repeating any token that has appeared in the text, helping to introduce new topics. Therefore, temperature and top_p are the correct choices.
Question 92 presents an Azure OpenAI resource with a model configured with a temperature of 1 (highly imaginative), top_p of 0.5, and max response tokens of 100. When a question is asked, the model provides a response with a "stop" finish reason, indicating a natural stop without truncation. The usage statistics show 86 completion tokens, 37 prompt tokens, and 123 total tokens. The question asks which statement is true. The first statement suggests being charged 86 tokens for the session. This is incorrect because charges are based on total tokens (123), not just completion tokens. The second statement claims the text completion was truncated because the max response token value was exceeded. This is also incorrect because the completion tokens were 86, which is below the 100 max response tokens, and the finish reason was "stop," indicating a natural completion. Thus, neither statement is true, making "none of the above" the correct answer.
Question 93 involves an Azure subscription with an Azure OpenAI resource hosting a GPT-4 model named Model1, used by an app named App1. The goal is to ensure App1 does not return answers that include hate speech. The question asks what should be configured for Model1. Frequency penalty is for reducing word repetition, not filtering hate speech. Abuse monitoring can track and report inappropriate content but doesn't prevent its generation. Content filtering is specifically designed to screen and filter out responses containing hate speech, ensuring the model's output is free from harmful or inappropriate content. Therefore, content filtering is the correct configuration.
Question 94 describes an Azure OpenAI resource with a GPT-3.5 Turbo model configured with a system message: "You are an AI assistant that helps solve mathematic puzzle. Explain your answer as if it is requested by four year old." This exemplifies priming in prompt engineering. Few-shot learning involves providing examples within the prompt, which isn't the case here. Affordance relates to object properties suggesting use, not a common term in prompt engineering for language models. Chain of Thought encourages breaking down answers into steps, which might be part of explaining to a child but isn't the primary technique being demonstrated by setting the model's persona. Priming involves setting the context or role for the model with specific instructions, influencing the type of response generated, which perfectly matches providing a system message to adopt a specific persona.
Question 95 asks for two ways to improve the quality of responses from a chatbot using the OpenAI GPT-3.5 model while minimizing development effort. Fine-tuning the model improves quality but requires significant development effort, so it's not suitable. Providing grounding content ensures responses are anchored in accurate, relevant information, improving quality without extensive development. Adding sample request and response pairs helps the model understand expected interactions, enhancing quality without much development effort. Retraining the language model with custom data or training a custom large language model are both resource-intensive and require extensive development, thus not meeting the criteria. Therefore, providing grounding content and adding sample request and response pairs are the two correct ways.
Question 96 focuses on deploying a model for an app that writes press releases using an Azure OpenAI resource, minimizing development effort. The task requires three sequential actions in OpenAI Studio. For writing press releases, GPT-3.5 Turbo models are appropriate, not text embedding models (which return numeric vectors). When choosing between applying a default system message template and a marketing writing assistant system message template, the latter is specifically tailored for marketing and writing tasks, aligning perfectly with the goal of writing press releases. Thus, the sequence involves deploying a GPT-3.5 Turbo model and then applying the marketing writing assistant system message template.
Question 97 involves a console app that answers user questions, calling an Azure OpenAI resource and outputting the result to the console. The code snippet requires completing two blanks. For blank one, since the task involves asking a text question and receiving a text answer, `chat_completion.create` is the correct method, as `embedding.create` and `image.create` are for different purposes. For blank two, to output the result to the console, the correct property to access the generated text is `response.choices[0].message.content`, as the model can generate multiple choices, and the first one's content is typically desired.
Question 98 requires creating a new resource to generate fictional stories in response to user prompts, ensuring the resource uses a customer-managed key to protect data. The Azure CLI command needs to be completed. For blank one, to generate fictional stories, an OpenAI resource is required, specified by `--kind "OpenAI"`, as it's designed for natural language processing and generation with GPT models.
Question 99 continues from question 98, asking to complete blank two in the same Azure CLI command for creating an OpenAI resource with a customer-managed key. The options are `api-properties`, `assign-identity`, and `encryption`. The command already includes details like key source, key name, and key secret version, which are properties of the API when using a customer-managed key. Therefore, `--api-properties` is the correct parameter to specify these settings. `assign-identity` is for managed identities, and `encryption` is a broader setting for encryption, but `api-properties` is specifically used to set these key management details.
This concludes the detailed summary of the provided questions and their answers, highlighting the reasoning behind each choice.