Model Deployment & MLOps Basics MCQs for the NSCT
Model deployment is the step that turns a trained model into a working service, and MLOps (machine learning operations) is the set of practices that keeps it reliable afterwards: serving, versioning, monitoring and retraining. It is the 16th of 17 topics in the AI / Machine Learning and Data Analytics area, which carries 10% of the NSCT according to HEC's Areas of Competencies.
Questions here are rarely about tool syntax. They describe a production situation and ask you to name the problem or pick the right strategy.
Serving
Serving means exposing a trained model so other systems can send inputs and receive predictions. There are two main patterns:
| Online (real-time) inference | Batch (offline) inference | |
|---|---|---|
| When it runs | Per request, on demand | On a schedule, over many records |
| Key metric | Latency (ms per request) | Throughput and total job time |
| Example | Fraud check during a card payment | Overnight churn scores for every customer |
A model is usually packaged with its code and libraries in a Docker container and served behind a REST API. Formats such as ONNX let a model trained in one framework run in another runtime.
Two numbers come up often. Throughput is requests handled per second. Little's law links the two: requests in flight = arrival rate x latency, so 400 requests/s at 50 ms means 400 x 0.05 = 20 requests in progress at once.
Exam angle: if the stem mentions a user waiting or a strict time limit, the answer is online inference; if it mentions "nightly" or "all customers", it is batch.
Deployment strategies
Releasing a new model version safely is its own skill.
| Strategy | What users see | Main benefit |
|---|---|---|
| Blue-green | All traffic switches from old to new at once | Instant rollback by switching back |
| Canary | A small share (say 5%) gets the new model first | Limits damage while you watch metrics |
| Shadow | Only the old model; the new one's outputs are logged | Real-traffic test with zero user risk |
| A/B test | Users split between versions | Measures business impact, such as conversions |
A model registry (for example in MLflow) stores each version with its metrics, data version and stage, which is what makes a quick rollback possible.
Exam angle: when wrong predictions could harm people, shadow deployment is the only option that tests on live traffic without exposing anyone.
Monitoring
Once live, a model is watched on three levels: system health (latency, errors), data (input and prediction distributions) and model quality (accuracy once labels arrive). Labels often arrive late, so a loan model's real outcome may take a year. Input and prediction distributions are your early warning.
Latency is reported with percentiles, not just the mean. In the 20 latencies on our quiz, two slow requests (90 ms and 250 ms) pull the mean to 29.95 ms while the median is 14.5 ms.
Exam angle: if a question says labels are not available yet, rule out accuracy, recall and confusion matrices.
Drift
Drift means the production world no longer matches the training data. Know three kinds apart:
| Term | What changes | Example |
|---|---|---|
| Data drift (covariate shift) | P(X), the inputs | More young users than in training |
| Concept drift | P(y given X), the input-to-target rule | Same houses now sell for 15% less after rate rises |
| Training-serving skew | Not the world, but your feature code | Serving passes raw age; training used scaled age |
A common drift score is the Population Stability Index (PSI): the sum over bins of (actual - expected) x ln(actual / expected). If four bins move from 25% each to 10%, 20%, 30% and 40%, PSI = 0.228. Practitioners often read below 0.1 as stable, 0.1 to 0.25 as moderate and above 0.25 as significant, but these cut-offs are industry convention, not a textbook rule.
Exam angle: drift is a warning, not proof of harm. If measured accuracy holds, investigate before rolling back.
Pipelines
An ML pipeline automates the steps from data to deployed model: ingest, validate data, transform features, train, evaluate, register, deploy. MLOps adds continuous training (CT) to DevOps's CI/CD, so the model is retrained when drift or performance crosses a threshold, and promoted only if it passes evaluation. A feature store keeps one feature definition for training and serving, which prevents skew. Reproducing a model needs the code commit, data version, hyperparameters and environment.
Exam angle: any ordering that deploys before evaluating is wrong.
Common traps
- Calling a change in P(y given X) "data drift". It is concept drift.
- Blaming drift for a model that fails in its first week while inputs look normal. That points to training-serving skew.
- Mixing up canary (some users see the new model) and shadow (no user sees it).
- Using the mean alone for latency. Tail percentiles such as p95 matter for user experience.
- Assuming versioning code is enough. Without data versioning,
SELECT * FROM tablegives different data each run. - Comparing a new model's score on this week's data with the old model's launch-day score. Both must be tested on the same held-out data.
Worked examples
1. Understanding. Which deployment strategy sends a copy of live requests to a new model but never returns its predictions to users? Answer: shadow deployment. Canary and A/B tests return the new model's output to some users, and blue-green switches everyone over.
2. Application. A batch job must score 900,000 records at 1,500 records per second. How long does it take? Answer: 10 minutes. 900,000 / 1,500 = 600 seconds, and 600 / 60 = 10 minutes.
3. Analysis. A credit model's offline AUC is 0.98, but in production it performs barely better than chance. One feature is "account closed within 6 months of the decision". What went wrong? Answer: target leakage. The feature uses future information that does not exist at prediction time, so it inflates offline scores and is empty or wrong in production. Drift would cause gradual decline, not instant failure.
Practise
The quiz below has 100 questions on this topic, filterable by tier and difficulty.
Practise: 100 questions
FAQs
What is the difference between data drift and concept drift?
Data drift (covariate shift) means the distribution of inputs changes, for example a new customer segment arrives, while the rule linking inputs to outcomes stays the same. Concept drift means that rule itself changes, so identical inputs now deserve a different answer, as when fraudsters change tactics. Data drift can be spotted without labels; concept drift usually needs labels to confirm.
Is MLOps the same as DevOps?
No. MLOps borrows DevOps practices such as automation, CI/CD and monitoring, then adds what ML needs: data and model versioning, data validation, experiment tracking, continuous training and drift monitoring. In ML, behaviour depends on data as well as code, so a system with unchanged code can still degrade as the data changes.
Do I need to know specific tools like MLflow or Kubernetes?
Know what each class of tool does rather than its commands: Docker packages a model, Kubernetes runs and scales containers, MLflow tracks experiments and hosts a registry, DVC versions data, and a feature store serves consistent features. Questions are far more likely to test the concept a tool solves than its syntax.
Next step
Continue to the next official topic, AI Ethics, Security & Privacy MCQs, go back to the AI & ML MCQs hub, or test yourself across all areas in an NSCT mock test.