Interview prep
MLOps Engineer
Makes training and serving repeatable, observable, and easy to undo.
These questions are representative practice, not from a specific company. Use them to rehearse how you think. A real interview will ask about your own work.
What is different about serving a model versus training it?
Hint. One is a batch job. The other is a request path.
Reveal answerHide answer
Training reads a dataset and writes weights. It can be slow and rerun. Serving answers a request within a latency budget, many times a second, on the weights you already froze. A training bug wastes a job. A serving bug hits users immediately, so rollback has to be fast.
What do you version besides the weights?
Hint. If you cannot rebuild the input, the weights are an artifact you cannot explain.
Reveal answerHide answer
Version the data snapshot, the feature code, the training code, the hyperparameters, and the eval set. Store them next to the model id. Two weight files with the same architecture can behave differently if the data changed. The registry should say how this file was made.
How do you roll back a bad model?
Hint. The previous version has to still be running, or be one switch away.
Reveal answerHide answer
Keep the last good version loaded or one deploy away. A flag or traffic split should point back at it without retraining. Confirm the rollback on the same health check you use for a launch: error rate, latency, and a few live examples. Write down who is allowed to flip that switch.
What is a canary release for a model?
Hint. A small share of traffic, with a comparison.
Reveal answerHide answer
Send a fraction of requests to the new version and the rest to the current one. Compare errors, latency, and, if you have labels later, quality. Promote only if the new version is not worse. A canary that nobody watches is just a partial outage.
How do you notice data drift?
Hint. Compare today's inputs with the inputs you trained on.
Reveal answerHide answer
Track simple statistics of important features and alert when they move past a threshold you set from history. Also watch the rate of each predicted class. Drift of inputs does not always mean the decisions got worse, so pair it with an outcome metric when you have one.
Where should secrets live for a training job?
Hint. Not in the notebook and not in the image.
Reveal answerHide answer
In a secret manager, injected at runtime into the job, with a short lease. The container image, the git repo, and the logs should not contain the key. The training job's identity should be allowed to read only the buckets it needs.
How do you keep GPU cost from surprising finance?
Hint. Quotas, idle shutdown, and a name on each job.
Reveal answerHide answer
Tag every job with a team and a purpose. Shut down idle notebooks and dev clusters. Set a quota so one experiment cannot take the whole pool. Report cost per successful training run and per 1,000 served requests, not only the monthly total.
What belongs in a model registry?
Hint. The file, the lineage, and the stage it is allowed to run in.
Reveal answerHide answer
The artifact, the version, the data and code that produced it, the eval scores, and the stage: experiment, staging, or production. Promotion should be an explicit step. Serving should pull by stage or version, not by whoever last uploaded a file to a bucket.
How would you put a prompt change through CI?
Hint. Treat the prompt like code. Run the eval on the pull request.
Reveal answerHide answer
Store the prompt in git. On a pull request, run the eval set and fail the check if quality, refusal rate, or cost moves past the budget. A person reviews the diff. Production serves the merged version. A prompt edited only in a dashboard will drift from what you tested.
What is the difference between an offline eval and an online one?
Hint. One uses a fixed set. The other watches live traffic.
Reveal answerHide answer
Offline, you score a frozen set of examples before you ship. Online, you measure what real requests do, often without a label until later. You need both. Offline catches known failures. Online catches the cases you did not think to write down.
How do you reproduce a training run from six months ago?
Hint. If the answer is a notebook on someone's laptop, you cannot.
Reveal answerHide answer
You need the code commit, the data snapshot, the environment lockfile, the hyperparameters, and the random seed if the stack honors it. The registry entry should point at all of those. Re-running it should be a job, not an archaeology project.
Design nightly scoring for a million rows.
Hint. Batch, idempotent, and easy to rerun one partition.
Reveal answerHide answer
Partition the table by date. A scheduled job reads one partition, scores it with a pinned model version, and writes the results next to the source key. If the job fails, rerun that partition only. Record the model version on every output row so you can explain yesterday's scores.
A request fails. Which logs do you need?
Hint. Enough to tell model, retrieval, and dependency apart.
Reveal answerHide answer
A request id, the model version, latency broken into stages, the error class, and whether a dependency timed out. Keep the raw input only as long as policy allows. Without the version and the stage, you will blame the model for a dead database.
How do you isolate one tenant's data?
Hint. Identity on every read, not a filter you hope the query includes.
Reveal answerHide answer
Put the tenant id in the token and enforce it in the data access layer, not only in the prompt. Separate indexes or rows with a mandatory filter. Test that one tenant's key cannot read another's documents. A prompt instruction is not an access control.
You are on call and the model is the suspect. What is your first move?
Hint. Compare with the last good version before you retrain anything.
Reveal answerHide answer
Check whether a deploy, a data job, or a dependency changed. Compare error rate and latency with an hour ago. If the new version is worse, roll back. Retraining in the middle of an incident is how you lose the evidence and the evening.
How do feature flags apply to models?
Hint. The flag selects a version. It does not live inside the weights.
Reveal answerHide answer
A flag or config chooses which model version a request uses. That lets you canary, pin a customer, or turn a version off. The weights themselves are not a flag. Keep the mapping in config you can change without rebuilding the image.