Train/Serve Skew
Find why a fraud model sees different features in production than in training and fix it.
Task
The fraud model has an offline AUC of 0.86, and online results are much worse. The model was trained on features from the training pipeline. In production, the scoring service builds its features with a serving pipeline that another team wrote from the same raw fields. You have forty logged serving requests, each matched to its training row by id, and a parity request that counts the rows where the two pipelines disagree. Find out why the model sees different features in production, and fix it so the two pipelines cannot drift apart again.
Requirements
- run(request) answers one request about one row or a list of rows. A row has id, amount (a number or null), account_age_days (a number or null) and category (a string or null). Rows are never changed.
- {op: "train_features", row} and {op: "serve_features", row} each return {features}: [log amount, account age in days, category index]. For the same row the serving features must equal the training features exactly. The training pipeline is the reference: the model was trained on its output, so what it computes does not change.
- {op: "score", row} returns {features, score}: the serving features and the model's probability of fraud, rounded to 6 decimals.
- {op: "parity", rows} returns {rows, mismatched, first}: how many rows were compared, how many have serving features that differ from their training features, and the id of the first such row (null when there is none).
- An amount or account age that is not a number or null raises ValueError containing its field name. rows that are not a list raise ValueError containing rows. An unknown op raises ValueError containing op.
How you are graded
- Decomposition 15%
- Prompting the assistant 15%
- Verification 20%
- Judgment about AI output 15%
- Correctness 25%
- Communication 10%
Scores use evidence from your session. A short or incomplete session may not provide enough evidence for every skill. See a sample scorecard
Interview guidance
Offline AUC is 0.86, and online results are much worse. You have forty logged serving requests matched to their training rows, and a parity request that counts where the two pipelines disagree. Find out why the model sees different features in production and fix it. Use the AI assistant however you like. Before you read the serving code, tell me how you will find every difference, not just the first one.
- AI is allowed and expected: your own Claude, OpenAI or Gemini key, or the free in-browser model.
- You are graded on how you drive and check the AI, not on how much you prompt.
- Run the checks; read what fails.
- A new requirement will arrive partway through.
- Too little AI use is reported as “not enough to grade”, never as a fail.
You will answer 7 debrief questions at the end
- What did you delegate to the AI, and why?
- Name one AI suggestion you rejected or changed, and why.
- Choose one block the AI helped write. Explain what each line does and which test verifies it.
- What is still risky, and what would you test or ship next?
- How did you find the differences, and in what order did you fix them? What did the parity count do after each fix?
- For each skew, what did the live model see, and what did that do to its scores?
- What stops the two pipelines from drifting apart again, and how would you catch it if they did?