Generative AI Leader Fundamentals of Generative AI Practice Question
A company wants to use a generative AI model to create product descriptions from a list of features. They need the model to consistently follow a specific format: a headline, followed by three bullet points, and a closing sentence. Which technique should they use to guide the model's output structure?
⚠ Common exam trap
The trap here is assuming that a larger model or deterministic settings will automatically produce the desired format, when prompt design is the key.
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
✓
Few-shot prompting with examples of the desired format.
Few-shot prompting is ideal for teaching the model a specific output format by providing examples. It allows the model to infer the pattern and apply it consistently. Other options like increasing temperature or changing model size do not directly address the need for structured output.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
Increasing the temperature to allow more creative freedom.
Why it's wrong here
Higher temperature increases randomness and creativity, which would make the output less consistent and likely deviate from the required format. The goal is to adhere to a strict structure, so increasing temperature is counterproductive and would not guide the model to follow the desired layout.
- ✗
Using a larger model with more parameters.
Why it's wrong here
A larger model may have greater capacity, but without explicit guidance, it may not inherently follow a specific format. Model size alone does not ensure adherence to structure; prompt design is key. Therefore, simply switching to a larger model is not the most effective solution for this requirement.
- ✗
Setting top-k to 1 to force deterministic output.
Why it's wrong here
Top-k=1 makes the model always pick the most likely token, resulting in deterministic but not necessarily formatted output. It does not teach the model the desired structure. While it reduces randomness, it does not provide the format guidance needed, so it is not the right technique here.
- ✓
Few-shot prompting with examples of the desired format.
Why this is correct
Few-shot prompting provides the model with several examples of the input-output format, allowing it to learn the pattern and apply it to new inputs. This is effective for enforcing a consistent structure like headline, bullets, and closing. It leverages in-context learning without retraining the model.
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.