Courseiva

Generative AI Leader Fundamentals of Generative AI Practice Question

A marketing team is using a generative AI model to create ad copy. They want to control the randomness of the output so that the same prompt produces consistent results for A/B testing. Which parameter should they adjust?

⚠ Common exam trap

Many exam-takers confuse top-k or top-p with determinism; those parameters narrow the sampling pool but still allow random selection within it, unlike temperature set to zero.

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

✓

Temperature

Temperature directly controls the randomness of token selection. A temperature of 0 (or very close to 0) makes the model deterministically pick the highest-probability token, ensuring the same prompt yields the same output. This is essential for A/B testing where consistent ad copy variants are required. Other parameters affect diversity but do not guarantee reproducibility.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • ✗

    Top-p

    Why it's wrong here

    Top-p, or nucleus sampling, limits the token pool to the smallest set whose cumulative probability exceeds p. Like top-k, it reduces randomness but does not eliminate it entirely. Even with a low top-p, there is still sampling among multiple tokens. For deterministic output, temperature is the more direct control.

  • ✓

    Temperature

    Why this is correct

    Temperature scales the probability distribution of the next token. Setting it to a low value, such as 0, makes the model choose the most likely token almost deterministically, leading to consistent outputs for the same prompt. This is ideal for A/B testing where reproducibility is needed. Higher temperatures increase randomness.

  • ✗

    Top-k

    Why it's wrong here

    Top-k limits the next token selection to the k most likely tokens, which reduces randomness but still allows variability. It does not guarantee deterministic output because the sampling among those k tokens remains random. For consistent results, a different parameter is more direct. Top-k is useful for balancing diversity and coherence, but not for exact reproducibility.

  • ✗

    Max output tokens

    Why it's wrong here

    Max output tokens controls the length of the generated response, not its randomness. Changing it would truncate or extend the output but would not make the same prompt yield the same text. It is useful for managing cost and latency, but irrelevant to consistency. The team needs to control sampling behavior, not length.

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 →

How Courseiva writes practice questions · Editorial policy

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.