KatInterview

Building a Kid-Suitability Filter for Rental Listings

Machine LearningModel answer
MediumModel answerMachine Learningml-system-designclassificationtrust-and-safety

Last updated

Design a probabilistic classifier that marks rental listings as suitable for infants and children, covering labeling, features, modeling, evaluation, host gaming, fairness, and cold start.

A vacation-rental marketplace wants a "family-friendly" toggle in search. When a guest traveling with kids flips it on, the results should contain only homes that are genuinely safe and comfortable for children.

Walk through the full design as an interview answer:

  1. Nail down the prediction target and the product goal — what are we optimizing, and how costly is a wrong positive versus a wrong negative?
  2. No clean labels exist for "kid-friendly." Show how you'd construct training labels and a trustworthy evaluation set.
  3. List features by data source and flag the dangerous ones.
  4. Give a baseline and an advanced model, plus how scores are calibrated, thresholded, and served within search latency.
  5. Specify offline metrics and the online experiment metrics, guardrails included.
  6. Hosts have an incentive to overstate child-safety amenities — how do you counter that?
  7. How do you keep the toggle from becoming a discrimination vector (against families, or by familial status)?
  8. Brand-new listings have no booking history — how do they still get a sensible score?

Interviewers want trade-off reasoning, plausible numbers, and awareness of the legal and trust-and-safety angles — not just a model diagram.

Hints

Hint 1

Pin down the product surface first: hard filter, ranking boost, or both? The latency and precision bar shifts depending on the answer.

Hint 2

Think about which errors hurt. A false positive (a home with an unfenced pool shown as kid-safe) ruins a family's trip; a false negative just hides a good listing. Let that asymmetry set your threshold.

Hint 3

Host claims ('crib on site', 'no children allowed') are features, not ground truth — reconcile them against photos, reviews, and complaint records.

Hint 4

Separate infants from older children: cribs and outlet covers versus fenced pools and open lofts. One binary label smears these needs together.