KatInterview

Instrument, Define, and Validate Metrics for a New Feature

Statistics & ExperimentsModel answer
HardModel answerStatistics & Experimentsmetricsexperimentationinstrumentation

Last updated

Design a measurement framework for a new product feature: pick a north-star and guardrails, plan instrumentation, derive KPIs from raw logs, and validate everything before stakeholders act on it.

Setting Up Measurement for a New Product Feature

Your team is about to launch a new feature — pick one you find interesting, or use the running example below. Your job is to build the full measurement layer around it: from deciding what success looks like, to making sure the numbers you report are actually correct.

Running example: a "Video Voicemail" feature inside a messaging app. Instead of typing a reply, a user records a short clip (≤ 30 s) directly inside the conversation thread. The recipient sees the clip inline and can react or reply in kind.

Work through each of the following areas. Interviewers expect concrete answers, not high-level hand-waving — name actual events, write representative SQL, and state your assumptions explicitly.

1. Goal alignment Before naming any metric, what clarifying questions would you ask? What assumptions are you making about why the feature exists and who it is for?

2. North-star and metric hierarchy Define one north-star metric that captures real two-sided value. Then name 3–5 driver metrics that decompose it into a funnel, 3–5 guardrail metrics that catch harm to adjacent product areas, and at least one counter-metric.

3. Instrumentation and tracking plan Sketch a tracking plan for the key events. For each event state: the trigger (client vs. server), required properties, join keys, and any schema-versioning concerns. What goes wrong if you log only on the client side?

4. Deriving KPIs from raw data Describe the pipeline from raw logs to the metric your stakeholders will read. Include a SQL sketch of the north-star. Call out the maturation delay and explain why you define ratios at the user level, not the event level.

5. Sanity checks List the specific checks you would run before declaring the metric trustworthy. Cover at least: reconciliation against a ground-truth source, funnel monotonicity, distribution checks, segment breakdowns, and how you would use dogfooding accounts.

6. Thresholds and alerting How do you set guardrail thresholds for an A/B test? How do you build an ongoing anomaly alert that is sensitive to real problems but does not page people at 2 a.m. for normal weekend dips?

7. Batch vs. streaming trade-offs How does the metric definition change if you need a near-real-time view (minutes of latency) versus a next-morning batch view? What caveats would you communicate to stakeholders about each?

What a strong answer looks like: it anchors every claim to the concrete feature, shows the funnel decomposition, writes defensible SQL, names realistic failure modes, and explains trade-offs rather than just listing best practices.

Hints

Hint 1

Start by asking why the feature exists — a metric that doesn't connect to a user need will mislead rather than guide. The north-star should require something to happen on both sides of the interaction, so a user can't inflate it by accident.

Hint 2

Instrumentation almost always breaks silently. Think about what happens on a crash mid-recording, an offline send, or a client retry — and explain why the server, not the client, is the source of truth for committed actions. Idempotent event IDs are your best friend for deduplication.

Hint 3

A metric is only final once its observation window has closed. A north-star that measures a 7-day downstream response can't be read on day 3 — build the concept of 'provisional' vs. 'final' into your pipeline design, and make sure your stakeholders know which version they're looking at.