Question 155 of 500
Fundamentals of Generative AIhardMultiple ChoiceObjective-mapped

Quick Answer

The answer is overfitting to the training data. When a fine-tuned LLM generates plausible but incorrect code, it has memorized specific patterns, syntax, or even bugs from its fine-tuning dataset instead of learning generalizable programming logic. This is a classic case of overfitting in fine-tuned LLM code generation, where the model produces outputs that look syntactically correct and contextually relevant but fail to execute properly because it hasn’t internalized the underlying algorithmic principles. On the Google Cloud Generative AI Leader exam, this question tests your understanding of fine-tuning risks—specifically how a model can become too specialized to its training examples, losing the ability to generalize to new problems. A common trap is assuming the issue is insufficient data or poor prompt engineering, but the hallmark of overfitting is code that *looks* right but doesn’t work. Memory tip: “Plausible but wrong? The model memorized the song but forgot the tune.”

Generative AI Leader Fundamentals of Generative AI Practice Question

This Generative AI Leader practice question tests your understanding of fundamentals of generative ai. Read the scenario carefully and evaluate each option against the stated constraints before committing to an answer. After answering, compare your reasoning against the explanation and wrong-answer breakdown below. Once you have made your selection, read the full explanation to reinforce the concept and understand why each distractor is designed to mislead on exam day.

A developer is using Vertex AI Generative AI Studio to fine-tune a PaLM 2 model for code generation. After training, they notice the model generates plausible but incorrect code. What is the most likely cause?

Clue words in this question

Noticing these words before you look at the options changes how you read each choice.

  • Clue: "most likely"

    Why it matters: Probability qualifier — the question wants the most probable cause or outcome, not a guaranteed one. Eliminate low-probability options.

Question 1hardmultiple choice
Full question →

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

Overfitting to training data

When a PaLM 2 model generates plausible but incorrect code after fine-tuning, the most likely cause is overfitting to the training data. Overfitting occurs when the model memorizes specific code patterns, syntax, or even bugs from the fine-tuning dataset rather than learning generalizable programming logic. This results in outputs that look syntactically correct and contextually relevant but fail to execute properly or solve the intended problem, because the model has not learned the underlying algorithmic principles.

Key principle: Answer the scenario, not the keyword: identify the specific constraint before choosing the most familiar-sounding option.

Answer analysis

Option-by-option breakdown

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

  • Overfitting to training data

    Why this is correct

    Overfitting leads to memorization of training data, including mistakes, reducing generalization.

    Clue confirmation

    The clue word "most likely" in the question point toward this answer.

    Related concept

    Read the scenario before looking for a memorised answer.

  • Insufficient training steps

    Why it's wrong here

    Insufficient steps typically lead to underfitting, not plausible but incorrect output.

  • Hallucination due to lack of grounding

    Why it's wrong here

    Hallucination is more about generating false information, not specifically plausible but incorrect code.

  • Prompt format mismatch

    Why it's wrong here

    Prompt mismatch would cause errors during inference, not after fine-tuning.

Common exam traps

Common exam trap: answer the scenario, not the keyword

The trap here is that candidates confuse 'plausible but incorrect code' with hallucination (Option C), but hallucination in code generation typically produces non-existent functions or libraries, whereas overfitting produces code that is syntactically valid and uses real functions but contains logical errors learned from the training data.

Trap categories for this question

  • Command / output trap

    Insufficient steps typically lead to underfitting, not plausible but incorrect output.

Detailed technical explanation

How to think about this question

Under the hood, overfitting during fine-tuning on Vertex AI occurs when the model's capacity (e.g., PaLM 2's 540B parameters) is too high relative to the size and diversity of the fine-tuning dataset, causing the model to encode noise and specific code snippets rather than generalizable patterns. A real-world scenario is fine-tuning on a small set of Python scripts that all use a particular buggy sorting algorithm; the model will then reproduce that buggy logic in new contexts, producing plausible but incorrect code. This is why techniques like early stopping, dropout, or using a validation split are critical during fine-tuning.

KKey Concepts to Remember

  • Read the scenario before looking for a memorised answer.
  • Find the constraint that changes the correct option.
  • Eliminate answers that are true in general but not in this case.

TExam Day Tips

  • Watch for words such as best, first, most likely and least administrative effort.
  • Review why wrong options are wrong, not only why the correct option is correct.

Key takeaway

Answer the scenario, not the keyword: identify the specific constraint before choosing the most familiar-sounding option.

Real-world example

How this comes up in practice

A cloud solutions architect for a retail company is evaluating services for a new workload. The correct answer here reflects best practice for the specific scenario described — not a general cloud recommendation. Answer the scenario, not the keyword: identify the specific constraint before choosing the most familiar-sounding option. Cloud exam questions reward reading the constraint carefully: the same technology can be right or wrong depending on the use case.

What to study next

Got this wrong? Here's your next step.

Identify which exam domain this question belongs to, review the core concept, then practise similar questions from the same domain.

Related practice questions

Related Generative AI Leader practice-question pages

Use these pages to review the topic behind this question. This is how one missed question becomes focused revision.

Practice this exam

Start a free Generative AI Leader practice session

Short sessions build daily habit. Longer sessions build exam-day stamina. Try a timed session to simulate real conditions.

FAQ

Questions learners often ask

What does this Generative AI Leader question test?

Fundamentals of Generative AI — This question tests Fundamentals of Generative AI — Read the scenario before looking for a memorised answer..

What is the correct answer to this question?

The correct answer is: Overfitting to training data — When a PaLM 2 model generates plausible but incorrect code after fine-tuning, the most likely cause is overfitting to the training data. Overfitting occurs when the model memorizes specific code patterns, syntax, or even bugs from the fine-tuning dataset rather than learning generalizable programming logic. This results in outputs that look syntactically correct and contextually relevant but fail to execute properly or solve the intended problem, because the model has not learned the underlying algorithmic principles.

What should I do if I get this Generative AI Leader question wrong?

Identify which exam domain this question belongs to, review the core concept, then practise similar questions from the same domain.

Are there clue words in this question I should notice?

Yes — watch for: "most likely". Probability qualifier — the question wants the most probable cause or outcome, not a guaranteed one. Eliminate low-probability options.

What is the key concept behind this question?

Read the scenario before looking for a memorised answer.

About these practice questions

Courseiva creates original exam-style practice questions with explanations and wrong-answer analysis. It does not publish real exam questions, exam dumps, or protected exam content. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

Last reviewed: Jun 25, 2026

Question Discussion

Share a tip, memory trick, or ask about the reasoning behind this question. Do not post real exam questions, leaked content, braindumps, or copyrighted exam material. Comments are moderated and may be removed without notice.

Loading comments…

Sign in to join the discussion.

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.