Courseiva

Generative AI Leader Practice Question: Techniques to Improve Generative AI Model Output

A generative AI model for chatbot responses sometimes produces toxic language. The team wants to reduce toxicity without significantly affecting the model's helpfulness. Which approach is best?

⚠ Common exam trap

Google Cloud often tests the misconception that post-processing filters (like toxicity classifiers) are sufficient for safety, when in fact they fail to address the model's learned behavior and can degrade helpfulness due to false positives, making fine-tuning with RLHF the superior alignment technique.

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

✓

Fine-tune with a dataset of non-toxic responses and use RLHF

Fine-tuning with a curated dataset of non-toxic responses directly adjusts the model's weights to reduce the likelihood of generating toxic language, while RLHF (Reinforcement Learning from Human Feedback) further aligns the model with human preferences for helpfulness and safety. This combined approach addresses the root cause of toxicity in the model's behavior without the blunt trade-offs of other methods, preserving the model's utility.

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 increases sampling randomness, which typically amplifies toxic and erratic outputs rather than suppressing them, and it also harms response coherence. It is tempting because temperature is a familiar tuning knob, but it governs creativity and diversity, not safety filtering.

  • ✗

    Reduce the maximum output tokens

    Why it's wrong here

    Capping output tokens truncates responses, which can cut off harmful content but equally curtails legitimate answers, degrading helpfulness without targeting toxicity. It is tempting as a cheap guardrail, yet token limits control length, not content, so the model's underlying toxicity remains unaddressed.

  • ✓

    Fine-tune with a dataset of non-toxic responses and use RLHF

    Why this is correct

    Supervised fine-tuning on non-toxic responses teaches safer output distributions, and RLHF then optimises the policy against a reward model balancing toxicity reduction with helpfulness. This directly targets the constraint of lowering toxicity without materially degrading response quality.

  • ✗

    Apply a toxicity classifier as a post-processing filter

    Why it's wrong here

    A post-processing toxicity classifier filters outputs after generation, which can suppress harmful responses but often degrades helpfulness by blocking borderline content and cannot address toxic internal representations. It is tempting because it is easy to deploy without retraining, and would be correct when only output filtering is feasible.

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.