Skip to main content

Design observability for 25 models in production at a lending company. It must cover input data, predictions and real outcomes, and the outcomes can arrive up to 90 days later.

System design · Pro 2

Short answer

Clarify who acts on an alert and what each model failure costs. Then monitor four layers: service health, input data quality and drift, prediction distribution, and outcome metrics once labels arrive. Log every prediction with features and model version, join outcomes later, track slices, alert with owners and runbooks, and link alerts to retraining or rollback.

Deeper answer

Clarify the purpose first. Observability must lead to action: someone owns each model, and each alert has a response. Ask which models are high risk and what regulators expect to be recorded.

Foundation: log every prediction with a request id, the feature values, the model version and the output.

Layers: first, service metrics such as latency, errors and traffic. Second, data quality: schema, missing values, ranges and freshness of each feature. Third, drift: compare the distribution of inputs and of predictions with a reference window. Fourth, outcomes: when repayment labels arrive, join them to the logged predictions and compute real performance and calibration, overall and by slice.

The 90 day delay is the central problem. For weeks you only have proxies: input drift, prediction drift and early signals such as a first missed payment. Treat them as warnings, not proof, because drift does not always reduce accuracy.

Trade-offs: sensitive alerts catch more but create noise, so alert on a few important features and review the others on dashboards. At scale, alert fatigue, storage cost of full logs and missing ownership break first.

What a strong answer covers

Answer it out loud in the mock interview about 2.5 min

Follow-ups to expect

Common mistakes

Learn it

Monitoring and drift

Practice System design questions

More on this topic

Today's AI turns are used

Lessons, roadmaps, videos, practice cards and the code playground stay free with your account, with no limit.