Generative AI Leader Fundamentals of Generative AI Practice Question
A developer is using a generative AI model to summarize long articles. They want to ensure the summaries are concise and do not exceed a certain length. Which parameter should they adjust to control the maximum length of the generated summary?
⚠ Common exam trap
Test-takers frequently confuse parameters that control randomness with those that control output length, such as assuming temperature affects length.
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
✓
Max output tokens
The max output tokens parameter directly limits the number of tokens the model can generate. By setting it to a desired value, the developer can prevent summaries from becoming too long. Other parameters like temperature, top-p, and top-k influence randomness and diversity but do not control output length.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
Temperature
Why it's wrong here
Temperature influences the randomness of token selection, not the length of the output. A low temperature makes the model more deterministic, while a high temperature increases variability. Neither setting restricts how many tokens are generated, so it cannot enforce a maximum summary length.
- ✓
Max output tokens
Why this is correct
Max output tokens sets the maximum number of tokens the model can generate in its response. By lowering this value, the developer can ensure summaries stay within a desired length. This parameter directly caps the output size, making it the correct choice for controlling summary length.
- ✗
Top-p
Why it's wrong here
Top-p, or nucleus sampling, controls the diversity of the output by limiting the token pool to a cumulative probability threshold. It does not directly limit the length of the generated text. Adjusting top-p affects randomness, not the maximum number of tokens produced, so it would not enforce a length constraint.
- ✗
Top-k
Why it's wrong here
Top-k sampling restricts the model to consider only the top k most probable tokens at each step. Like top-p, it affects the diversity of the output but does not control the total number of tokens generated. Therefore, it is not suitable for limiting the length of a summary.
Go deeper
Related to this question
About these practice questions
One of 1,008 original Generative AI Leader practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. 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.