Choosing Offline Metrics for Ranking Photos Memories Candidates

Last updated: November 29, 2026

Quick Overview

The Photos app generates candidate Memories (trips, people, pets) and ranks which to surface on the For You tab. Which offline metrics would you use to compare two ranking models, and how would you validate that they predict online engagement?

Apple
Machine Learning
Data Scientist
Apple
November 29, 2026
Data Scientist
Onsite
Machine Learning
Medium

0

0

0 solved


The Photos app generates candidate Memories (trips, people, pets) and ranks which to surface on the For You tab. Which offline metrics would you use to compare two ranking models, and how would you validate that they predict online engagement?

Apple's on-device intelligence teams rank personal content with no server-side click logs for most users, so evaluation often relies on opted-in data and proxy labels. The interviewer looks for ranking metrics chosen for a short, top-heavy list and awareness that offline gains must be checked against online behavior.

What the Interviewer Expects
  • Chooses position-aware metrics such as NDCG@k or MRR because only a few Memories show at once
  • Defines graded relevance labels (played, favorited, shared, dismissed) and their weights
  • Addresses bias from logged data: users only interact with what was shown
  • Validates offline-to-online correlation across past launches
  • Includes guardrails such as diversity and sensitive-content avoidance
Key Topics to Cover
NDCG
graded relevance
offline-online correlation
diversity metrics
logging bias
How to Approach This
  1. Understand the bias-variance trade-off. High training accuracy but low test accuracy signals overfitting.
  2. Choose evaluation metrics carefully based on the problem. Accuracy alone is often insufficient.
  3. Feature engineering is often more impactful than model selection.
  4. Know when to use tree-based models (tabular data) vs neural networks (unstructured data).
  5. Handle class imbalance with SMOTE, class weights, or appropriate loss functions.
Possible Follow-up Questions
  • How would you handle a Memory that the user explicitly dismissed or marked 'feature less'?
  • What if the new model wins NDCG but shows the same person in every slot?
  • How do you evaluate when most data must stay on device?
  • How many queries or users do you need to detect a 1% NDCG difference?
Sharpen Your Skills on Codemia

Practice similar problems with our interactive workspace, get AI feedback, and track your progress.

Explore ML Interview Prep
Sample Answer
Clarify

Confirm the surface: how many Memories are visible without scrolling (say 3 to 5), what actions exist (play, favorite, share, dismiss, 'feature this person less'), and what data is available for offli...

Approach

Because users see a short list, I want a top-weighted metric: NDCG@5 with graded gains, plus MRR for 'did the first slot get played'. Labels per candidate: share or favorite = 3, full play = 2, partia...


Submit Your Answer
Markdown supported