The interview problem

Practice prompt

A recommendation team reports that click-through rate increased from 4% to 6% after a model change. Logged data includes only displayed items, and the new evaluation contains more returning users. Can you conclude the new model is better? Design an evaluation and explain when propensity weighting helps.

Original fundamentals practice, not a reported interview. Examples are invented. Primary research references retrieved September 26, 2026.

1. Specify what the comparison should estimate

Define the target population, decision unit, eligible item set and outcome window. Suppose the question is expected clicks per eligible recommendation opportunity for today's intended user mix. A score computed only for users who clicked measures a different quantity. An opportunity that produced no display because the service failed must not disappear from an end-to-end product metric.

Distinguish population mix from policy exposure. Returning users may be more likely to click even under the same model. Separately, the previous ranking policy determines which items receive observable feedback. A missing click label for an unshown item is not a negative judgment of its relevance. This problem can exist even with perfectly time-correct features and clean train/test separation.

2. Work through a misleading aggregate

For this numerical example, assume every eligible opportunity produces one display, so per-display and per-opportunity denominators coincide. Assume new users click 2% of displayed recommendations and returning users click 8%, with identical rates under both model versions. The old evaluation contains two-thirds new users and one-third returning users: (2/3 × 2%) + (1/3 × 8%) = 4%. The new evaluation reverses that mix: (1/3 × 2%) + (2/3 × 8%) = 6%.

The entire apparent two-point improvement comes from composition. Standardizing both evaluations to a 50/50 population gives 5% for each. This calculation does not establish that user type is the only relevant difference; it shows why the aggregate cannot establish model improvement.

Report counts and outcomes within relevant pre-decision slices, then choose weights matching the target population. Do not choose slices solely because they make the new model look good. Reweighting on observed variables cannot automatically correct selection driven by unobserved intent, device failures or changing item quality. Avoid conditioning on a variable changed by the model, such as whether a user engaged after seeing its output, when estimating the total effect.

3. Reconstruct the logging policy

For each opportunity retain the context available before the decision, eligible actions, selected action, policy version, assignment probability and eventual reward. Keep label maturity and telemetry loss visible. Assignment probability means the probability with which the deployed policy selected that action in that context, not a relevance score or the model's predicted click probability.

A deterministic ranker that never exposes a candidate provides no observed outcome for that action in that context. A new policy that selects it cannot be evaluated nonparametrically from those logs alone. Random exploration can provide coverage within approved eligibility constraints, but exploration must respect the product's quality and safety boundaries.

Position and slate effects complicate the action definition. A document at position one is not necessarily the same treatment as that document at position ten. Item-level probabilities are insufficient for arbitrary slate-level rewards unless additional factorization or click-model assumptions are justified. Log what the evaluator actually needs rather than assuming a single probability column solves every ranking problem.

4. Calculate a small inverse-propensity estimate

Consider a simplified single-item choice with no contextual differences. A randomized logging policy selects A with probability 0.8 and B with probability 0.2. Across 100 opportunities, suppose A is shown 80 times and receives 8 clicks; B is shown 20 times and receives 4 clicks. The observed policy's click rate is 12 / 100 = 12%.

To estimate a target policy that always chooses B, each B observation receives the ratio target probability / logging probability = 1 / 0.2 = 5. A observations receive weight zero. The inverse-propensity estimate is (4 × 5) / 100 = 20%. Dividing by the full 100 opportunities matters: the weight already accounts for the selection probability.

This estimate addresses the target policy under the stated randomized logging design and shared opportunity distribution. It is not proof that B will achieve exactly 20% in production. Only 20 observed B outcomes inform that estimate; uncertainty can be large. If B's logging probability were zero, the ratio would be undefined and the target would lack support. No numerical smoothing creates the missing evidence.

The example assumes stable rewards and that the logged randomization is correctly recorded. In contextual evaluation, use the probability for each observed context/action pair and the target policy's corresponding probability. Aggregate action frequency is generally not a substitute for those conditional probabilities.

5. Diagnose unreliable corrections

Inspect weight distributions, target coverage and the effective sample size diagnostic (Σw)² / Σw². For this example, 20 nonzero weights of 5 give 100² / 500 = 20. This is a useful warning about concentration, not a universal confidence-interval formula. Repeated users and time dependence still require appropriate uncertainty estimation.

Very small propensities generate large weights and high variance. Clipping weights trades some bias for lower variance; report the threshold and sensitivity rather than calling the clipped estimate unbiased. Self-normalization divides the weighted reward sum by the sum of weights rather than the number of opportunities. The two coincide in this toy sample because the weights sum to 100; they need not coincide in another random sample. Self-normalization changes finite-sample behavior too. A more elaborate estimator cannot compensate for a policy that never tried the actions you want to assess.

Missing or incorrect propensities are a data-quality failure, not permission to use predicted click rates in their place. Estimated propensities require assumptions about what drove exposure. Hidden selection variables can invalidate causal conclusions even when a propensity model fits observed assignments well.

Clicks themselves are incomplete feedback: presentation affects attention, accidental clicks happen and long-term satisfaction may diverge from immediate engagement. Define reward and outcome maturity before evaluation. Keep a held-out evaluation set for a frozen target policy; repeatedly choosing policies to maximize the same noisy weighted estimate can overfit it.

6. Give the team an actionable evaluation plan

First audit opportunity counts, missing telemetry and pre-decision user mix. Recompute stable-slice metrics and a standardized aggregate. Next assess exposure support and logging quality before attempting off-policy estimation. Report unsupported target actions explicitly instead of quietly dropping them.

Use an appropriately randomized online experiment to validate the decision when feasible, with a randomization unit suited to interference and repeated users. Track outcome quality, latency and failure rates alongside clicks. Offline weighting can screen candidates and reveal risk; it does not automatically capture changes in user behavior or inventory caused by deploying a new policy.

A strong conclusion for the prompt is: the reported aggregate is insufficient, the mix example explains how it could arise without model improvement, and the logged exposure mechanism determines which alternative policies can be estimated. Ask for better evidence rather than inventing a corrected success claim.

7. Follow-ups and self-review

Foundation: distinguish unobserved feedback from a negative label. Senior: explain why logging an action's relevance score does not supply its propensity. Staff: evaluate a new slate policy when historical exploration covered only individual substitutions.

Score 0–2 each for target-population clarity, the mixture calculation, correct action probabilities, support and variance analysis, and a feasible validation plan. Full marks require stating what the data cannot identify. Continue with data leakage and confidence intervals.

Sources and next steps

These are foundational research references, not recent interview reports. Numerical examples and the investigation plan are original.

Continue your preparation

Choose a connected learning path or browse more ML fundamentals questions. Read our editorial method and attribution policy.