Courseiva

Generative AI Leader Google Cloud's Generative AI Offerings Practice Question

A developer is using the Vertex AI PaLM API to generate code. They want to ensure the output is safe and adheres to company policies. Which THREE attributes can they configure in the safety_settings parameter?

⚠ Common exam trap

Test-takers frequently confuse general NLP features (like language detection or sentiment analysis) with the specific safety filtering attributes available in the safety_settings parameter, leading them to select options that are not part of the API's harm category configuration.

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

✓

Toxicity

The safety_settings parameter in the Vertex AI PaLM API accepts a list of safety categories, each with a configurable threshold, and the supported categories include Toxicity (C), Harassment (D), and Sexually explicit content (E), so these three are the attributes the developer can configure to filter unsafe output and enforce company policies. Toxicity (C) lets them block content that is rude, disrespectful, or otherwise harmful, Harassment (D) targets content that bullies or intimidates individuals or groups, and Sexually explicit content (E) filters sexually explicit material; each is a distinct safety category with its own threshold setting. Language detection (A) is not a safety category but a separate text-analysis capability, and sentiment analysis (B) is likewise an analytical feature rather than a configurable safety attribute, so neither belongs in safety_settings.

Answer analysis

Option-by-option breakdown

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

  • ✗

    Language detection

    Why it's wrong here

    Safety settings accept harm-category thresholds (hate speech, harassment, sexually explicit, dangerous content), not language identification. Language detection is a distinct Natural Language API feature, and would be the right tool when routing or translating multilingual text rather than enforcing content safety.

  • ✗

    Sentiment analysis

    Why it's wrong here

    Safety settings expose harm categories such as hate speech, harassment, sexually explicit content and dangerous content, each with a blocking threshold; sentiment polarity is not one of them. Sentiment analysis is a separate Natural Language API capability, correct when classifying opinion tone rather than filtering harmful output.

  • ✓

    Toxicity

    Why this is correct

    Toxicity is a configurable safety attribute within the Vertex AI PaLM API's safety_settings, letting the developer set thresholds that block harmful or offensive generated code. This directly satisfies the stem's requirement to keep output safe and aligned with company policies, alongside other harm categories.

  • ✓

    Harassment

    Why this is correct

    Harassment is one of the configurable harm categories in the PaLM API's safety_settings, letting the developer set blocking thresholds so generated code cannot contain harassing content, directly satisfying the requirement that output adheres to company policy.

  • ✓

    Sexually explicit content

    Why this is correct

    Sexually explicit content is one of the harm categories configurable through the safety_settings parameter, letting the developer set blocking thresholds that enforce company policy on generated code. It directly satisfies the stem's requirement to make Vertex AI PaLM output safe and policy-compliant.

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.