31/35
Part 3 of 3 · Serving and driftLearn and do

What interviewers ask next

A feature is right in training and wrong in production. How do you find it?

Start from parity, not from the model. Take a sample of logged requests, recompute the feature offline for the same member and time, and diff the two. Then sort the mismatches by pattern:

What the mismatches shareThe likely cause
Wrong at certain hours of the daya day boundary or a time zone
Wrong just after midnightevent time used where created time was needed
The served value is a defaulttimeouts, and training never saw defaults
The served value is older than it should bea cache TTL or stream lag
Everything slightly offtwo implementations: move to one shared definition

It's the same skill as the pull-request review in that one reported Netflix screen: say what breaks in production in a feature pipeline whose tests pass (1 report). The usual suspects are a join on a future timestamp, days cut at UTC, and a fill value that differs from serving's.

In the editor, write cause(m), the table's sort as code, and top_cause(mismatches), which can count the causes with the imported Counter. Each dict in MISMATCHES is one mismatch from a parity check, with its minute of the day, whether serving used a default, and the value's age next to its allowed age.