Generative AI Leader Fundamentals of Generative AI Practice Question
A developer is experimenting with a Gemini model in Vertex AI Studio and notices that for the same prompt, the model produces different answers each time. The developer needs the output to be as consistent and deterministic as possible for a classification task. Which parameter change should they make?
⚠ Common exam trap
The trap here is believing that output length controls or streaming settings influence how random or repeatable a model's responses are.
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
Set the temperature to 0
Sampling parameters govern how the model picks the next token. Temperature 0 selects the most probable token deterministically, which is ideal when the same input should map to the same output, as in classification. Other parameters such as token limits and streaming affect output length and delivery, not the randomness of selection, so they cannot deliver the consistency the developer needs.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
Increase the maximum output tokens
Why it's wrong here
The maximum output token limit caps how long a response can be; it does not affect sampling randomness. Raising it lets the model write more but does not make the output more deterministic. For a classification task, longer output is unnecessary and could even introduce extra explanation text that complicates parsing.
- ✗
Enable streaming responses
Why it's wrong here
Streaming controls how tokens are delivered to the client, returning them incrementally rather than all at once. It has no effect on which tokens the model chooses, so it cannot improve determinism. The same underlying sampling process occurs whether or not streaming is enabled, making this irrelevant to the consistency problem.
- ✗
Set the temperature to 2
Why it's wrong here
A high temperature flattens the probability distribution, increasing randomness and diversity. This is the opposite of what a deterministic classification task needs; it would make outputs even less consistent across runs. High temperature is suited to creative writing or brainstorming, not to tasks requiring stable, repeatable labels.
- ✓
Set the temperature to 0
Why this is correct
A temperature of 0 makes the model select the highest-probability token at each step, producing the most deterministic and repeatable output. For classification tasks where consistency matters more than creativity, this is the appropriate setting. It minimizes sampling randomness, so identical prompts tend to yield identical or nearly identical results.
Go deeper
Related to this question
About these practice questions
This Generative AI Leader question is part of Courseiva's 1,008-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. Learn why practice questions differ from exam dumps →
JA
Written and reviewed by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
Last reviewed September 2026 · checked against the official Google Cloud exam blueprint
This Generative AI Leader practice question is part of Courseiva's free Google Cloud certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the Generative AI Leader exam.