Courseiva

Generative AI Leader Fundamentals of Generative AI Practice Question

A team uses PaLM 2 API to generate product descriptions, but the output sometimes contains factual inaccuracies. What is the best approach to improve accuracy?

⚠ Common exam trap

Google Cloud often tests the misconception that tuning generation parameters (temperature, top_k, max tokens) can fix factual accuracy issues, when in reality those parameters control randomness and length, not the model's reliance on its training data versus external sources.

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 grounding with Google Search

Grounding with Google Search is the correct approach because it allows the PaLM 2 API to retrieve real-time, verifiable information from the web, directly reducing factual inaccuracies in generated product descriptions. Unlike parameter adjustments, grounding provides an external knowledge source that the model can cite, ensuring outputs are based on current and accurate data rather than relying solely on its training data.

Answer analysis

Option-by-option breakdown

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

  • ✗

    Increase the temperature parameter

    Why it's wrong here

    Raising temperature flattens the probability distribution, increasing sampling randomness and therefore hallucination, which worsens factual accuracy. Higher temperature is the correct choice when generating varied creative text, such as brainstorming or marketing copy, where diversity is wanted.

  • ✗

    Reduce the top_k value

    Why it's wrong here

    Lowering top_k restricts sampling to fewer candidate tokens, which reduces variety but does not ground output in verified facts, so inaccuracies persist. Top_k tuning suits controlling output diversity, not correcting factual errors; retrieval grounding addresses accuracy.

  • ✓

    Use grounding with Google Search

    Why this is correct

    Grounding with Google Search retrieves current, authoritative web evidence and conditions generation on it, so product descriptions reflect verified facts rather than the model's parametric guesses. This directly addresses the factual inaccuracy constraint better than prompt tweaks or temperature changes.

  • ✗

    Set the max_output_tokens higher

    Why it's wrong here

    Raising max_output_tokens only extends the response length limit; it cannot reduce hallucinated facts, since accuracy depends on grounding or retrieval, not token budget. It is tempting because token limits genuinely matter when answers are truncated mid-sentence, and increasing them would be correct for that truncation scenario.

About these practice questions

This Generative AI Leader question is part of Courseiva's 1,008-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 →

How Courseiva writes practice questions · Editorial policy

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.