Courseiva

Generative AI Leader Fundamentals of Generative AI Practice Question

A data scientist is using Vertex AI to generate product descriptions from a list of features. They notice that the model sometimes omits key features or invents details not present in the input. They want to reduce hallucinations and ensure all provided features are included. Which technique should they apply?

⚠ Common exam trap

The trap here is thinking that lowering randomness parameters like top-p will solve hallucinations, when the real issue is lack of guidance on the task format.

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 a few-shot prompting approach with examples that include all features.

Few-shot prompting is the most direct way to guide the model to include all features and avoid hallucinations. By showing examples where every feature is incorporated accurately, the model learns the expected pattern. Other parameters like temperature or top-p affect randomness but do not provide the necessary instruction on completeness and fidelity.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • ✗

    Enable the model's grounding feature with a public dataset.

    Why it's wrong here

    Grounding with a public dataset can provide factual context, but it does not ensure that the model uses all provided features. It might even introduce external information. For this scenario, the goal is to adhere to the given input, not to retrieve external data.

  • ✓

    Use a few-shot prompting approach with examples that include all features.

    Why this is correct

    Few-shot prompting provides the model with examples of the desired input-output format, showing how to incorporate all features without adding extraneous details. This guides the model to follow the pattern, reducing omissions and hallucinations. It is an effective prompt engineering technique for structured generation tasks.

  • ✗

    Set the top-p parameter to 0.1 to narrow the token selection.

    Why it's wrong here

    Lowering top-p restricts the model to a smaller set of probable tokens, which can make outputs more focused but does not guarantee inclusion of all features. It may help reduce creativity but won't teach the model to follow the input list. It is not a substitute for explicit examples.

  • ✗

    Increase the temperature to encourage more creative outputs.

    Why it's wrong here

    Increasing temperature makes the model more random and creative, which would likely worsen hallucinations and omissions. Higher temperature is not suitable when factual accuracy and completeness are required. It would introduce more variability and potentially more invented details.

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 →

How Courseiva writes practice questions · Editorial policy

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.