Generative AI Leader Practice Question: Techniques to Improve Generative AI Model Output
A developer is using Vertex AI PaLM 2 to generate product descriptions. The output is often too verbose and includes irrelevant details. Which technique should the developer apply?
⚠ Common exam trap
Candidates often confuse hyperparameter tuning (top_p, temperature) with prompt engineering techniques, assuming that reducing randomness (top_p) or increasing creativity (temperature) can fix verbosity, when only explicit examples in the prompt can reliably enforce a specific output style.
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
✓
Use few-shot prompting with examples of concise descriptions
The developer needs to constrain the model's output to be concise and relevant. Few-shot prompting provides the model with explicit examples of the desired output format (concise descriptions), guiding it to mimic that style and length. This directly addresses verbosity and irrelevant details without altering the model's fundamental randomness or safety settings.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
Set top_p to 0.1
Why it's wrong here
Reduces token diversity but does not directly address verbosity.
- ✗
Enable safety filters
Why it's wrong here
Safety filters block harmful content, not verbosity.
- ✓
Use few-shot prompting with examples of concise descriptions
Why this is correct
Guides the model to match the style of provided examples.
- ✗
Increase temperature to 0.9
Why it's wrong here
Increases randomness, likely making output more verbose.
Go deeper
Related to this question
About these practice questions
Courseiva writes every Generative AI Leader question from scratch — 683 in total, each with an explanation and a wrong-answer breakdown. None are copied from real exams or 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.