AI-900 Practice Question: Describe fundamental principles of machine learning on Azure
A manufacturer trains a model to detect defective parts on an assembly line. Only 2% of parts are defective. The model predicts 'non-defective' for all parts and achieves 98% accuracy. Which metric best reveals the model's inability to identify defective parts?
⚠ Common exam trap
The trap here is that candidates see 98% accuracy and assume the model is performing well, overlooking that accuracy is inflated by class imbalance and does not measure the model's ability to detect the rare defective class.
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
✓
Recall
Recall (sensitivity) measures the proportion of actual defective parts correctly identified by the model. With 98% accuracy but zero true positives (since the model labels everything as non-defective), recall is 0%, which directly exposes the model's failure to detect any defective parts despite high accuracy.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
Accuracy
Why it's wrong here
Accuracy is the ratio of correct predictions to total predictions, but in a defect-detection task the classes are usually very imbalanced: defective parts may be only 2% of all parts. If the model simply classifies every part as non-defective, accuracy reaches 98% even though it never catches a single defect. Therefore accuracy is misleading here because it masks a complete failure on the minority defective class by rewarding the majority class.
- ✗
Precision
Why it's wrong here
Precision is the fraction of predicted defective parts that are actually defective (TP / (TP + FP)). When the model predicts zero defects, there are no true positives and no false positives, so precision is either undefined or assigned 0 — it does not tell you that every real defect was missed. Precision measures how trustworthy a positive prediction is, not whether defects are being found, so it cannot expose the model's recall failure directly.
- ✓
Recall
Why this is correct
Recall, also called sensitivity or the true positive rate, is computed as TP / (TP + FN), where FN represents actual defective parts that the model failed to identify. Because the model detected no defects, TP = 0, so recall is 0%, which correctly reveals that the model misses all defective parts. This makes recall the most direct and appropriate metric for a defect-detection problem where the cost of missing a defect is high.
- ✗
F1 Score
Why it's wrong here
The F1 score is the harmonic mean of precision and recall: F1 = 2 × (precision × recall) / (precision + recall). With zero true positives, both precision and recall become 0, so F1 is also 0, but this single aggregate number only tells you the model performed badly — it does not show that the failure is caused by missing every defective part. Recall alone gives the actionable insight that no defects were detected, while F1 conflates that with the precision problem.
Go deeper
Related to this question
About these practice questions
Courseiva writes every AI-900 question from scratch — 985 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 AI-900 practice question is part of Courseiva's free Microsoft 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 AI-900 exam.