hardMultiple Choice
Generative AI Leader Practice Question: A company deploys a GenAI-powered code review…
A company deploys a GenAI-powered code review assistant. During evaluation, they find that the assistant often suggests security vulnerabilities as improvements. What is the MOST likely cause?
⚠ Common exam trap
A common misconception tested in this context is that prompt engineering alone (e.g., adding a security constraint) can override fundamental training data biases, when in fact the model's learned weights from the training corpus are the dominant factor in output quality.
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
✓
The model was trained on a dataset with many insecure code examples
The most likely cause is that the model was trained on a dataset containing many insecure code examples. A GenAI code review assistant learns patterns from its training data; if that data includes prevalent security vulnerabilities (e.g., SQL injection, buffer overflows), the model will internalize those patterns as 'normal' or even 'desirable' improvements. This leads to the assistant suggesting insecure code changes because it is statistically replicating the flawed logic it was exposed to during training.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✓
The model was trained on a dataset with many insecure code examples
Why this is correct
Training data containing insecure code patterns teaches the model that such patterns are acceptable improvements, so it reproduces them during review. This directly satisfies the stem's constraint: the assistant recommends vulnerabilities because its learned distribution reflects the insecure examples it was trained on, rather than secure coding practise.
- ✗
The model's temperature is set too low
Why it's wrong here
Low temperature makes output more deterministic, not less secure; it cannot introduce vulnerability patterns. It is tempting because temperature is a familiar tuning knob, and raising it would be correct when the assistant produces repetitive or overly rigid suggestions that need more varied phrasing.
- ✗
The model is too small for code generation tasks
Why it's wrong here
Model size affects reasoning depth and code quality, not whether the model treats insecure patterns as improvements. It is tempting because undersized models genuinely struggle with complex code generation, so scaling up would be correct if the assistant produced syntactically broken or incomplete code.
- ✗
The prompt does not include a security constraint
Why it's wrong here
A missing security constraint leaves the model free to optimise for functionality, so it proposes insecure patterns. It is tempting because prompt engineering genuinely shapes output, but the stem describes systematic vulnerability suggestions, which points to training data or fine-tuning rather than an omitted instruction.
Go deeper
Related to this question
About these practice questions
Courseiva writes every Generative AI Leader question from scratch — 1,008 in total, each with an explanation and a wrong-answer breakdown. None are copied from real exams or dumps. Learn why practice questions differ from exam dumps →
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.