Courseiva
Techniques to Improve Generative AI Model OutputhardMultiple ChoiceObjective-mapped

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

A team deployed a fine-tuned model for code generation. After training, the model produces syntactically correct but functionally wrong code. What is the most likely cause?

⚠ Common exam trap

Google Cloud often tests the misconception that syntactically correct but functionally wrong code is caused by prompt or temperature issues, when in fact it is a classic sign of overfitting where the model memorizes syntax without understanding logic.

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

Overfitting to training data causes the model to memorize specific code patterns and syntax from the training set without learning the underlying logic or functional requirements. This results in syntactically correct outputs that fail to generalize to new, unseen coding tasks, producing functionally wrong code despite proper syntax.

Answer analysis

Option-by-option breakdown

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

  • Incorrect prompt format

    Why it's wrong here

    Affects input handling, not training quality.

  • Low temperature setting

    Why it's wrong here

    Affects randomness, not functional correctness.

  • Insufficient training epochs

    Why it's wrong here

    Would likely cause underfitting, not syntax-correct but wrong logic.

  • Overfitting to training data

    Why this is correct

    Model memorizes training examples, losing generalization.

About these practice questions

This Generative AI Leader question is part of Courseiva's 683-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.