Courseiva

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

A social media company uses a generative AI model to moderate user posts. The model occasionally allows offensive content. Which safety technique should be implemented?

⚠ Common exam trap

A common misconception tested in the Google Gen AI Leader exam is that prompt engineering (few-shot examples) or parameter tuning (temperature) can substitute for dedicated safety mechanisms, but these do not provide hard guarantees against offensive content.

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

✓

Configure safety filters on the model endpoint in Vertex AI.

Configuring safety filters on the model endpoint in Vertex AI directly blocks offensive content at inference time by applying predefined or custom safety thresholds (e.g., toxicity, harassment categories). This is the most reliable technique for real-time moderation, as it prevents harmful outputs regardless of prompt engineering or tokenization changes.

Answer analysis

Option-by-option breakdown

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

  • ✗

    Use a different tokenizer to avoid offensive words.

    Why it's wrong here

    Tokenisation only splits text into subword units; it carries no semantic judgement, so offensive meaning survives any tokenizer change. It tempts because it sounds like filtering at input, and would be the right lever for handling vocabulary size, multilingual text or unknown words, not content moderation.

  • ✓

    Configure safety filters on the model endpoint in Vertex AI.

    Why this is correct

    Configuring safety filters on the Vertex AI model endpoint applies configurable thresholds that block harmful categories before responses reach users, catching offensive content the base model permits. This is a platform-level control applied at inference time, complementing prompt design or fine-tuning.

  • ✗

    Add few-shot examples of safe posts in the prompt.

    Why it's wrong here

    Few-shot examples steer output style and format, not the model's underlying safety boundaries; offensive posts can still pass because the classifier's decision threshold is unchanged. It tempts because prompting is cheap and quick, and would be correct for teaching a desired output pattern or tone.

  • ✗

    Reduce the temperature to 0.

    Why it's wrong here

    Temperature controls sampling randomness, so lowering it to 0 makes outputs deterministic but does nothing to stop offensive content the model already weights highly. It tempts because it reduces erratic generation, and would suit tasks needing reproducible, factual answers, not safety filtering.

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 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.