Exam AI-102 All QuestionsBrowse all questions from this exam
Question 266

HOTSPOT

-

You have an Azure subscription that contains an Azure OpenAI resource named AI1.

You build a chatbot that will use AI1 to provide generative answers to specific questions.

You need to ensure that the responses are more creative and less deterministic.

How should you complete the code? To answer, select the appropriate options in the answer area.

NOTE: Each correct selection is worth one point.

    Correct Answer:

Discussion
chandiochan

I think this must be user instead of system role. ChatRole.User identifies the text as coming from the user in the conversation. This is important because the AI model will use this information to understand the context of the prompt and tailor its response accordingly.

chandiochan

In the role dropdown, you would select "user" because you are simulating a user's input to which the chatbot should respond. The API call will use this context to generate a response as if it were the assistant. You only need to specify the role for the input messages you're including in your API call, not the responses you're expecting to generate.

TJ001

it is the user message for which response is generated by this API function. so i will go with user as well.. the deterministic and creativity is controller by temperature value low or high

TJ001

the 'content ' is blank here adds to the confusion :( .. so how can it be blank being a user message.. so could be system as well just to prime with the temperature settings. please suggest if anyone has clarity

34c89bf

system message is optional and the model’s behavior without a system message is likely to be similar to using a generic message such as "You are a helpful assistant." So, It should be system. second one is temprecture

Murtuza

This one is SYSTEM here and not user. Looking at the code Typically, a conversation is formatted with a system message first, followed by alternating user and assistant messages. https://platform.openai.com/docs/guides/text-generation/chat-completions-api

fba825b

True, but if we expect the answer from the AI language model, we should send to the model user input

NagaoShingo

1. user 2. temperature

chandiochan

n this context, when configuring the chatbot's behavior, you would use the "system" role to provide initial settings or instructions that affect the overall behavior of the chatbot. This is not an actual message that's part of the conversation with the user but rather a directive to the AI on how to conduct itself in the conversation. For example, you might use this to set the chatbot's personality, instruct it to prioritize certain types of information, or follow specific conversational guidelines. The "assistant" role, on the other hand, is used for messages that simulate responses from the AI as part of the conversation with the user. It represents the chatbot's side of the dialogue. Since you want to ensure that the responses are more creative and less deterministic, and this is a setting affecting the AI's behavior, the "system" role is the correct choice. You might include instructions in the "system" message that tell the AI to be more creative or to use less strict adherence to certain conversational rules.

Harry300

Should be system / temp Without a system prompt, the reponses are more creative

nithin_reddy

Assistant and Temperature as per ChatGPT, I think that's right

34c89bf

system message is optional and the model’s behavior without a system message is likely to be similar to using a generic message such as "You are a helpful assistant." So, It should be system. second one is temprecture

shorymor

Microsoft Copilot seems to be clear on this one. Based on that, answer is correct It's response about this question (I did not ask about temperature because that one is obvious) o ensure that your chatbot’s responses are more creative and less deterministic, you should use the Chat.Role.Assistant. This role represents the AI language model (such as GPT-3.5 Turbo) and allows for imaginative and varied answers. By assigning messages to the assistant role, you encourage the model to generate creative and less predictable content.