The interview problem
Design visual product recognition that can say unknown when a package is outside the training catalog.
Original practice, not a reported company interview. Scenarios and numbers are illustrative. Interview date: not applicable. Sources retrieved October 1, 2026.
1. Scope and worked approach
Assume a changing catalog and human-assisted registration. Encode an image, retrieve known candidates and combine similarity, image quality and classifier evidence in a rejection rule. Build evaluation sets with held-out product families, not only corrupted known images. Separate near-unknown lookalikes from distant unknowns. Store evidence for reviewer decisions and add approved new identities through a versioned catalog update.
2. Trace the design or derivation
Quality check → retrieve catalog candidates → assess membership → identify or reject → review registration
Separate temporary unreadability from genuinely unknown identity in the review queue. Otherwise bad photographs can create duplicate catalog entries. Human registration should search for existing variants and record which packaging changes belong to one product identity before new labels become training data.
3. Calculate the example
A test has 900 known and 100 unknown images. Accepting every image and correctly classifying 882 known items gives 88.2% overall correct decisions, but unknown rejection recall is zero. Known-class accuracy alone is 98% and hides this failure.
4. Failure cases and trade-offs
Softmax always distributes probability over known classes; a high maximum is not proof of catalog membership. Stricter rejection reduces false accepts but increases review load. Track unknown recall at an acceptable known-item rejection rate and keep catalog freshness visible.
5. Validation, follow-ups and self-review
Test new packaging, lookalike brands and partial crops. Follow-up: how would recognition change with a barcode signal? Self-review: specify unknown evaluation, review capacity and identity registration.
Sources and related practice
Technical reference: scikit-learn.org — Novelty versus outlier detection; catalog rejection requires the proposed task-specific evaluation.
Source publication/update: Not established. Retrieved October 1, 2026. The workflow, calculations and review exercises are original; this reference is not evidence that a company asked this question.
Continue with Design recommendations for new marketplace sellers; Design a near-duplicate detection system.
Continue your preparation
Choose a connected learning path or browse more ML system design questions. Read our editorial method and attribution policy.