Courseiva

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

A developer wants to generate Python code using Google Cloud's generative AI. Which model should they invoke?

⚠ Common exam trap

Many candidates confuse Chirp (audio) or Imagen (image) with code generation because all are Google Cloud generative AI offerings, but each is specialized for a distinct modality, and the question explicitly asks for code generation.

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

✓

Codey

Codey is Google Cloud's family of models specifically designed for code generation, completion, and chat, built on the PaLM 2 architecture and fine-tuned on code-heavy datasets. For a developer needing to generate Python code, Codey is the correct choice because it is purpose-built for code-related tasks, unlike other models that specialize in different modalities.

Answer analysis

Option-by-option breakdown

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

  • ✗

    Chirp

    Why it's wrong here

    Chirp is a speech-to-text model that transcribes audio, so it cannot emit Python code; it is tempting because it is a Google Cloud generative AI model, and would be the correct choice for converting recorded speech into written text.

  • ✓

    Codey

    Why this is correct

    Codey is Google Cloud's foundation model family purpose-built for code, trained on source code and tuned for generation, completion and debugging tasks. Invoking it satisfies the stem's Python code generation requirement, whereas general-purpose text models like PaLM or Gemini lack that code-specialised tuning.

  • ✗

    Imagen

    Why it's wrong here

    Imagen generates and edits images from text prompts, producing no executable code; it is tempting because it is a prominent Google Cloud generative AI model, and would be the right choice for creating or modifying visual assets rather than Python source.

  • ✗

    Meena

    Why it's wrong here

    Meena is a conversational chatbot model, not a code-generation model, and is not offered through Google Cloud's generative AI APIs; it is tempting because it is a well-known Google research model, and would suit open-ended dialogue rather than producing Python code.

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.