easyMultiple Choice
Generative AI Leader Practice Question: The primary purpose of the temperature parameter…
What is the primary purpose of the temperature parameter when using a generative language model?
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
✓
It controls the randomness of token selection; lower values make output more deterministic
Temperature controls the randomness of token selection. Lower values produce more deterministic and conservative outputs, while higher values increase diversity and creativity.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
It sets the maximum number of tokens the model can generate in a single response
Why it's wrong here
Maximum output length is set by the max tokens parameter, which caps generation independently of sampling. Temperature scales logits before softmax, altering randomness rather than length. The option tempts because both are generation settings, yet only max tokens truncates the response.
- ✗
It determines the number of candidate tokens considered at each step
Why it's wrong here
Candidate token count is governed by top-k or nucleus sampling parameters, not temperature. Temperature rescales the probability distribution to control randomness. Confusion arises because both shape sampling, but top-k limits the pool while temperature flattens or sharpens it, so this describes a different control.
- ✗
It adjusts the similarity threshold for vector search retrieval
Why it's wrong here
Vector search similarity thresholds belong to retrieval configuration, such as top-k or score cut-offs in a vector store, and operate before the model generates text. Temperature instead modifies the softmax distribution during decoding. The link is tempting because retrieval and generation both influence output, but they act at separate stages.
- ✓
It controls the randomness of token selection; lower values make output more deterministic
Why this is correct
Temperature scales the probability distribution over the vocabulary before each token is sampled, so lower values sharpen that distribution towards the highest-probability tokens, yielding repeatable, deterministic output. This directly satisfies the stem's focus on the parameter's primary purpose: governing randomness in token selection.
Go deeper
Related to this question
About these practice questions
Courseiva writes every Generative AI Leader question from scratch — 1,008 in total, each with an explanation and a wrong-answer breakdown. None are copied from real exams or dumps. Learn why practice questions differ from exam dumps →
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
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.