Generative AI Leader Practice Question: Techniques to Improve Generative AI Model Output
A team uses a generative model to summarize lengthy legal documents. The summaries are accurate but often exceed the target length of 200 words, varying widely. Which simple adjustment should be applied to ensure consistent output length?
⚠ Common exam trap
Google often tests the misconception that prompt engineering or fine-tuning can enforce precise numerical constraints, when in fact only a hard token limit parameter provides deterministic control over 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
✓
Set the max output tokens parameter to 200.
Setting the max output tokens parameter to 200 directly caps the number of tokens the model can generate, ensuring the summary cannot exceed the target length. This is a deterministic, model-level constraint that works regardless of prompt phrasing or training data, making it the most reliable adjustment for consistent 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.
- ✗
Fine-tune the model on summaries that are exactly 200 words.
Why it's wrong here
Overkill and time-consuming when a simple parameter setting works.
- ✓
Set the max output tokens parameter to 200.
Why this is correct
Max token limits directly truncate the output, enforcing the length constraint.
- ✗
Add a system prompt that says 'Summarize in exactly 200 words.'
Why it's wrong here
Prompt instructions may be ignored or inaccurately followed; a hard token limit is more reliable.
- ✗
Lower the temperature to reduce variability in word choices.
Why it's wrong here
Temperature does not control output length.
Go deeper
Related to this question
About these practice questions
This Generative AI Leader question is part of Courseiva's 683-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 →
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.