exam questions

Exam AI-102 All Questions

View all questions & answers for the AI-102 exam

Exam AI-102 topic 7 question 8 discussion

Actual exam question from Microsoft's AI-102
Question #: 8
Topic #: 7
[All AI-102 Questions]

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.

Show Suggested Answer Hide Answer
Suggested Answer:

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
chandiochan
Highly Voted 1 year, 1 month ago
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.
upvoted 12 times
...
NagaoShingo
Highly Voted 10 months, 3 weeks ago
1. user 2. temperature
upvoted 8 times
...
sooss
Most Recent 1 month, 1 week ago
it can not be temperature since it is set to -1. Temperature ranges are 0 to 2. It is frequency_penalty o rpresence_penalty
upvoted 1 times
sooss
1 month, 1 week ago
I apologize. It is temperature. I confused equal to sign with -
upvoted 1 times
...
...
syupwsh
2 months ago
repeat qn 1. user 2. temperature
upvoted 1 times
...
Alan_CA
5 months, 2 weeks ago
response = openai.ChatCompletion.create( model="gpt-4", messages=[ {"role": "system", "content": "bla bla bla"}, {"role": "user", "content": "bla bla bla"}, {"role": "system", "content": "temperature": 0.7} ] )
upvoted 1 times
...
mrg998
7 months, 1 week ago
its user not system, you set the temp of the response you want to recieve when user prompt is sent
upvoted 2 times
...
JakeCallham
8 months ago
Usually you start with a system message and seeying that messages is still empty I would say system. But content being empty makes it hard to really determine. System is optional. So next would be user or assisant. If its a free chat than assistant wont be next, but User. This is really a terrible question because we can have three options. You can set temp to any of them, it just doesn't make sense with system. Because messages is an array you can change the temp constantly. It makes the most sense with user i guess. But again, a terrible code example to be honest.
upvoted 4 times
...
nithin_reddy
9 months, 2 weeks ago
Assistant and Temperature as per ChatGPT, I think that's right
upvoted 2 times
...
34c89bf
9 months, 3 weeks ago
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
upvoted 1 times
...
chandiochan
1 year ago
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.
upvoted 4 times
TJ001
11 months, 1 week ago
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
upvoted 1 times
TJ001
11 months, 1 week ago
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
upvoted 2 times
34c89bf
9 months, 3 weeks ago
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
upvoted 1 times
...
...
...
...
shorymor
1 year ago
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.
upvoted 1 times
...
Murtuza
1 year ago
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
upvoted 3 times
fba825b
10 months, 2 weeks ago
True, but if we expect the answer from the AI language model, we should send to the model user input
upvoted 1 times
...
...
chandiochan
1 year, 1 month ago
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.
upvoted 3 times
...
Harry300
1 year, 1 month ago
Should be system / temp Without a system prompt, the reponses are more creative
upvoted 3 times
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...
exam
Someone Bought Contributor Access for:
SY0-701
London, 1 minute ago