Generative AI Leader Practice Question: Techniques to Improve Generative AI Model Output
A healthcare chatbot must avoid hallucinations. Which TWO techniques should the team implement? (Choose two.)
⚠ Common exam trap
Google often tests the misconception that increasing randomness (temperature, top_k) or disabling penalties improves output quality, when in fact these parameters increase hallucination risk in safety-critical applications like healthcare.
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 chain-of-thought prompting
Chain-of-thought prompting (B) reduces hallucinations by forcing the model to reason step-by-step, which improves factual accuracy and consistency in complex tasks like medical triage. Enabling grounding with a knowledge base (E) anchors the model's output to verified external data, directly preventing fabrication by restricting responses to retrieved facts.
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 frequency penalty to 0.0
Why it's wrong here
A frequency penalty of 0.0 applies no penalty at all, so repeated tokens remain equally likely and hallucination risk is unchanged. It is tempting because frequency penalty is a real sampling control, and a non-zero value would discourage verbatim repetition; however, the scenario needs grounding techniques such as retrieval-augmented generation, not token-level repetition tuning.
- ✓
Use chain-of-thought prompting
Why this is correct
Chain-of-thought prompting forces the model to expose intermediate reasoning steps before answering, which surfaces unsupported leaps and improves factual grounding in clinical responses. For a healthcare chatbot where hallucination risk must be minimised, this step-by-step decomposition satisfies the accuracy constraint by making faulty logic detectable rather than hidden inside a single confident output.
- ✗
Use higher temperature
Why it's wrong here
Higher temperature increases sampling randomness, producing more varied and creative outputs, which raises hallucination risk rather than reducing it. It is tempting when generating diverse content, but grounded, factual healthcare answers require low temperature plus retrieval-augmented generation and citation constraints.
- ✗
Increase top_k to 50
Why it's wrong here
Increases token diversity, not helpful.
- ✓
Enable grounding with a knowledge base
Why this is correct
Grounding with a knowledge base retrieves authoritative, verifiable source content and supplies it to the model as context, so responses cite real data rather than fabricated claims. This directly satisfies the healthcare chatbot's requirement to avoid hallucinations.
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 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.