GCP Generative AI Leader Practice Question 28: Temperature Parameter Tuning
Google Cloud Generative AI Leader · Test 3 · question 8 of 10
A legal operations team uses Gemini to draft standard contract clauses. They need the wording to stay close to their approved templates every time, with as little creative variation as possible between runs of the same prompt. A brainstorming team in the same company wants Gemini to generate a wide variety of unusual marketing taglines from the same short prompt.
Which parameter change addresses both teams' needs, applied in opposite directions?
Show answer and explanation
Answer:
Temperature controls the randomness of token selection. A lower temperature makes the model favor the most probable next token, producing more consistent, predictable output, which suits the legal team's need to stay close to approved wording. A higher temperature spreads probability across more tokens, producing more varied and creative output, which suits the marketing team's need for a range of unusual taglines.
Option A is wrong because max output tokens only caps response length; it has no effect on how predictable or varied the wording is.
Option B is wrong because top-k limits the pool of candidate tokens the model samples from, not the number of examples in a prompt; that describes few-shot prompting, a different technique entirely.
Option D reverses the actual effect of temperature and misstates what it does. Temperature does not make a model "double-check" its output, and it has no direct effect on generation speed.
Reference: Experiment with parameter values