exam questions

Exam AI-102 All Questions

View all questions & answers for the AI-102 exam

Exam AI-102 topic 7 question 6 discussion

Actual exam question from Microsoft's AI-102
Question #: 6
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
GHill1982
Highly Voted 9 months ago
The ChatRole that should be used is ChatRole.User. This role is assigned to the messages that come from the user, which the chatbot is responding to. The Temperature setting can be adjusted to increase creativity in the responses.
upvoted 13 times
friendlyvlad
1 week ago
The ChatRole.User specifies that the message is coming from the user in the conversation, while ChatRole.Assistant indicates that the message is coming from the AI assistant. The question clearly states that we need to modify output. In addition, the temperature parameter is primarily used to control the randomness of the model's generated response, which is associated with the ChatRole.Assistant 1. ChatRole.Assistant 2. Temperature
upvoted 1 times
...
...
NagaoShingo
Highly Voted 6 months ago
1. user 2. temperature
upvoted 6 times
...
Alan_CA
Most Recent 4 weeks, 1 day ago
An example given by Copilot : {"role": "system", "content": "temperature": 0.7}
upvoted 1 times
...
csdodo
3 months ago
ChatRole.User represents generating a response without being prompted by a speaker, making the AI more creative and less deterministic, allowing it more freedom to express itself.
upvoted 1 times
...
JakeCallham
3 months, 2 weeks ago
You are not setting the temp for user, that doesn't make sense. People please think a bit and dont trust on stupid responses from obvious dumb chatbots. System is what you're trying to configure.
upvoted 1 times
famco
3 months, 1 week ago
Sir, you are not setting temperature to a role, but to the request itself.
upvoted 1 times
mrg998
2 months, 3 weeks ago
this is right, you are setting the temp for a response. To test this do a restAPI call to azureOpen AI instance, even when posting a the user prompt, you get an option for temperture in the body.
upvoted 1 times
...
...
...
Moneybing
3 months, 3 weeks ago
Copilot says ChatRole.User. "To make the responses more creative and less deterministic, you should set the ChatRole.User in your coding. By doing so, you allow the chatbot to generate more imaginative and varied answers, as it will treat the user input as a prompt for creative responses. This approach encourages the chatbot to think beyond predefined patterns and produce more engaging content"
upvoted 1 times
...
anto69
4 months ago
Should be System since we're modifying the behavior of the Bot. So we start again defining the System message that must be defined only one time
upvoted 2 times
...
nithin_reddy
4 months, 3 weeks ago
Right answer is ChatRole.Assistant and Temparature, the settings are on responses from chatbot
upvoted 1 times
...
fba825b
6 months ago
First would be ChatRole.System as it is the first chat in the ChatMessage object and the second answer is Temperature
upvoted 1 times
fba825b
6 months ago
Mistake! I actually think it should be ChatRole.User as we are then awaiting for the answer from the LLM (assistant)
upvoted 2 times
...
...
formacionkiteris
6 months, 1 week ago
First Option should be ChatRole.System. "Typical usage begins with a chat message for the System role that provides instructions for the behavior of the assistant followed by alternating messages between the User role and Assistant role." https://learn.microsoft.com/en-us/dotnet/api/azure.ai.openai.chatcompletionsoptions.messages?view=azure-dotnet-preview#remarks
upvoted 1 times
...
vovap0vovap
6 months, 3 weeks ago
Well, I think that should be ChatRole.System ChatRole.User naturally make no sense - that user request
upvoted 3 times
...
Dhibi_111
7 months ago
Selecting ChatRole.User as one of the options would imply that the responses should be generated based on the user's input or perspective. However, in this scenario, the goal is to ensure that the responses from the chatbot are more creative and less deterministic. Including ChatRole.User might limit the creativity of the responses because the model would primarily consider the user's input rather than generating novel content. By primarily focusing on ChatRole.Assistant, the responses will be predominantly generated from the perspective of the AI assistant, allowing for more creative and varied outputs. This approach ensures that the chatbot's responses are not overly influenced by the user's input, leading to more diverse and imaginative answers.
upvoted 4 times
...
shorymor
7 months, 4 weeks ago
ChatRole.User (Assuming the input is an actual message from user) Temperature Documentation/Examples: https://learn.microsoft.com/en-us/azure/ai-services/openai/how-to/reproducible-output?tabs=pyton
upvoted 3 times
...
f2c587e
8 months, 2 weeks ago
D,C. Con rol de user el chat es menos formal. con temperatura se ajusta la creatividad en las respuestas.
upvoted 1 times
...
chandiochan
8 months, 3 weeks ago
Yes, if the content you're inserting is the actual user message, then you should use ChatRole.User. This role signifies that the message is coming from the user, as opposed to the assistant, which would be generating the response.
upvoted 2 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