Google Cloud Generative AI Leader Practice Questions

Google Cloud Generative AI Leader exam preparation

Google Cloud Generative AI Leader practice questions in English: 180 questions with explanations. The mock exam has 60 questions and 90 minutes.

Google Cloud Generative AI Leader free question 6 / 10 · Domain 3: Techniques to improve gen AI model output

A model's candidate tokens A, B and C have probabilities of 0.3, 0.2 and 0.1, and top-P is set to 0.5. Which tokens can the model choose from for the next token?

  1. Token C, the least probable token, to increase diversity in the output
  2. Tokens A, B and C, whose probabilities add up to 0.6
  3. Token A, the single most probable token in the list
  4. Tokens A and B, together reaching the top-P value of 0.5
Show the answer and explanation

Answer: D

Why this is correct
The page explains that top-P selects tokens from the most probable to the least probable until the sum of their probabilities equals the top-P value. With probabilities of 0.3, 0.2 and 0.1 and a top-P of 0.5, tokens A and B are enough to reach 0.5, so the model selects either A or B by using temperature and excludes C as a candidate.

Why the other options are wrong
"Tokens A, B and C, whose probabilities add up to 0.6" … Tokens are added from most to least probable until their probabilities equal the top-P value. A and B reach 0.5, so C is excluded.
"Token A, the single most probable token in the list" … Selecting only the most probable token describes a top-K of 1, also called greedy decoding. Top-P keeps tokens until their probabilities reach the value.
"Token C, the least probable token, to increase diversity in the output" … Top-P excludes C here. A lower top-P gives less random responses and a higher value gives more random ones.

Key points
Top-P keeps the most probable tokens until their probabilities reach the top-P value; a lower value gives less random responses.

Go to the Google Cloud Generative AI Leader practice app (10 free questions; purchase unlocks all questions)

See the full practice set