Generative AI Leader Practice Question: Techniques to Improve Generative AI Model Output
A product team at a retail company is using a foundation model on Vertex AI to generate short marketing taglines for new products. They find the outputs are often too long and sometimes include extra commentary. They want to constrain the model to produce only a single concise tagline. Which parameter should they adjust?
⚠ Common exam trap
Candidates often confuse parameters that control randomness with those that control output 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 caps the total number of tokens generated, which directly enforces a limit on response length. By setting it appropriately, the team can ensure the model produces only a short tagline and cannot continue with extra commentary. Other parameters like temperature, top-k, and top-p affect randomness and diversity, not 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 controls the randomness of token selection; lowering it makes outputs more deterministic but does not limit length or prevent extra commentary. The model could still generate multiple sentences or additional text. It is not the right parameter to enforce a strict output length or stop unwanted content.
- ✗
Top-p
Why it's wrong here
Top-p (nucleus sampling) limits the cumulative probability of tokens considered, influencing creativity but not output length. It will not truncate a response after a certain number of tokens. Thus, it is ineffective for ensuring the model stops after one tagline.
- ✓
Max output tokens
Why this is correct
Max output tokens sets a hard limit on the number of tokens the model can generate in its response. By setting this to a small value that accommodates a single tagline, the team can prevent lengthy outputs and force the model to be concise. It directly addresses the length issue described.
- ✗
Top-k
Why it's wrong here
Top-k restricts sampling to the k most likely tokens, which affects diversity but not the total number of tokens generated. It will not stop the model from producing extra commentary or exceeding a desired length. Therefore, it does not solve the problem of overly long taglines.
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.