Original practice scenario: Design a hypothetical search index for frequently changing public documents. Updates arrive late and an old document version may reappear after deletion. How do you prevent stale resurrection?
Read model answer +
Model indexed documents as versioned source records and make deletion a durable state transition. Search availability and source freshness require separate service objectives.
Work through it
Assign a source identity and monotonic source version where available; store the version accepted by the index and reject older updates.
Propagate tombstones through ingestion, indexing and caches, retaining them long enough to outlive expected replay and recovery windows.
Support a replayable change log and reconciliation scan, exposing lag and missed-deletion metrics separately from query latency.
Tradeoffs to discuss
Frequent refreshes improve freshness but increase indexing work; incremental updates are efficient while periodic rebuilds offer a useful consistency check.
Common pitfalls
Arrival time does not prove source ordering when retries or batch exports delay events.
Test delete-then-recreate semantics explicitly; a new source object may need a different generation identity.
Original practice scenario: A hypothetical search team wants to train from clicks. Explain why treating every clicked result as relevant can fail and propose an evaluation strategy.
Read model answer +
Clicks reflect both relevance and exposure. Results placed higher receive more opportunities to be clicked, so a model trained directly on clicks can reinforce its existing ordering.
Work through it
Define the intended outcome, such as useful task completion, and retain impression position, query context and candidate eligibility with each observation.
Collect independent relevance judgments and use controlled randomization or another justified exposure model to study position effects.
Evaluate on held-out queries and important slices, then run a bounded online experiment with quality, latency and abandonment guardrails.
Tradeoffs to discuss
Randomization improves identification but can temporarily degrade results; human judgments offer another signal while introducing cost and assessor disagreement.
Common pitfalls
Do not interpret unexposed results as negative examples.
Avoid sharing the same user or near-duplicate query across training and evaluation when that creates leakage.