Home ML Solutions Quest โ˜…0 XP

From idea to a working model

A model that works in a notebook is not a solution. In this quest you take one through its whole life: business goal โ†’ data โ†’ training โ†’ evaluation โ†’ deployment โ†’ monitoring, the way Amazon did for its call centre.

๐Ÿ—บ๏ธ 8 short levels ๐ŸŽฎ mini-games โญ earn XP and badges โฑ๏ธ about 70 minutes
Start level 1 See the big picture first

This is your warm-up. After this quest, the full Day 3 notes will feel easy.

Your progress wheel: clear a level to light up a segment

1

Level 1 of 8, about 10 minutes

The ML lifecycle

Goal: name the 7 phases and say what happens in each.

The ML lifecycle is the end-to-end process of developing, deploying and maintaining a model.

It is a loop, not a straight line. You go back and improve again and again.

Tap a phase

Explore all 7 phases to earn XP.

Explored 0 of 7

Memory trick: B-P-D-M-D-M-R
Business goal โ†’ Problem framing โ†’ Data โ†’ Model โ†’ Deploy โ†’ Monitor โ†’ Retrain
โ€œBright People Design Models, Deploy, Monitor, Repeat.โ€
๐Ÿ”ข Game: put the lifecycle in order
Click the phases in the right order. Get it wrong and you start again.
Who is in the room? Business stakeholders, subject matter experts, data scientists, data engineers, ML architects, product managers. The lifecycle only works when they talk to each other. That teamwork has a name: MLOps (level 8).

๐Ÿ Checkpoint

Where does every ML project start?

The model is live but accuracy is slipping. Which phase?

๐ŸŽ‰ Level 1 cleared! +50 XP
2

Level 2 of 8, about 10 minutes

Real story: the Amazon call centre

Goal: follow one real project through the whole lifecycle.

๐Ÿ˜– The problem

โ€œPress 1 for Returns. Press 2 for Kindle. Press 3 forโ€ฆโ€. Amazon sells almost everything, so the menu could never cover it all. Customers picked the wrong option, reached the wrong agent, and got transferred again and again. With hundreds of millions of calls a year, that wasted time and money, and annoyed customers.

๐ŸŽฌ Follow the project, step by step
Press โ€œNext stepโ€ to move through the lifecycle with the Amazon team.
1. Business goalFewer transfers, happier customers
2. Problem framingPredict which skill solves the call โ†’ multiclass classification
3. Data collectionPast calls with the correct skill = labels โ†’ supervised learning
4. PreprocessingClean data, study labels, merge all Kindle skills into one
5. Visualisation40% returns, 30% Prime, 30% Kindleโ€ฆ
6. TrainingSplit data 80 / 10 / 10 before training
7. TuningHyperparameters + better features
8. Deploy & monitorTransfers went down. Goal met!
๐Ÿงฉ

Features they used

What were the customerโ€™s recent orders? Does the customer own a Kindle? Are they a Prime member?

๐Ÿท๏ธ

The label

The agent skill that actually solved the call.

๐Ÿ”ง

Smart data cleaning

Several Kindle skills became one โ€œKindleโ€ label. Fewer, cleaner labels = simpler model.

๐ŸŽš๏ธ

Tuning the learning rate

Too fast: never settles on a good answer. Too slow: never gets there in time.

๐Ÿ•ต๏ธ Game: you are the ML team
Answer the questions the Amazon team had to answer.

๐Ÿ Checkpoint

โ€œWhich of 20 agent skills should this call go to?โ€ isโ€ฆ

Past calls already had the right skill recorded. So this isโ€ฆ

๐ŸŽ‰ Level 2 cleared! +50 XP
3

Level 3 of 8, about 8 minutes

Split your data

Goal: explain why we hold data back, and what each split is for.

The goal of ML is to generalise: to work on data the model has never seen.
โš ๏ธ Testing a model on its training data rewards memorising, not learning. It is like giving students the exam paper they practised on.
โœ‚๏ธ Try it: split 10,000 examples
Move the slider. Common splits are 80/10/10 or 70/15/15.

๐Ÿ“˜

Training set

The model learns from this.

๐Ÿ“

Validation set

Check and improve: tune hyperparameters, compare versions.

๐ŸŽ“

Test set

The final, honest check. Used once, at the very end.

Why two hold-out sets? If you tune against the test set, you slowly โ€œlearnโ€ it, and the final score becomes too optimistic. The validation set takes that role, so the test set stays truly unseen.

๐Ÿ Checkpoint

Which set is used to tune hyperparameters?

Why not evaluate on the training data?

๐ŸŽ‰ Level 3 cleared! +50 XP
4

Level 4 of 8, about 12 minutes

Amazon SageMaker AI: one tool per phase

Goal: match each SageMaker AI feature to its lifecycle phase.

Amazon SageMaker AI is a fully managed ML service: collect and prepare data, build and train models, deploy them and monitor their predictions, all in one place.
๐Ÿงน Prepare data

Data Wrangler

  • Low-code / no-code: import, clean, transform, analyse
  • Add your own Python steps
๐Ÿงน Prepare data at scale

Processing API, EMR, AWS Glue

  • Run scripts and notebooks on managed infrastructure
  • scikit-learn, MXNet, PyTorch
๐Ÿ—„๏ธ Store features

Feature Store

  • Create, share and reuse features
  • Same features for training and inference
๐Ÿ‹๏ธ Train

Training jobs

  • Built-in or custom algorithms
  • Model artifacts saved to Amazon S3
๐Ÿ–ฑ๏ธ Train without code

SageMaker Canvas

  • No-code predictions and AutoML
๐Ÿš€ Start from a ready model

SageMaker JumpStart

  • Pre-trained open-source models and solution templates
๐Ÿ”ฌ Compare runs

SageMaker Experiments

  • Track data, algorithms and parameters
  • See the effect of each change on accuracy
๐ŸŽš๏ธ Find the best settings

Automatic Model Tuning

  • Runs many jobs with different hyperparameters
  • Picks the best by your chosen metric
๐Ÿ“ฆ Deploy

Inference options

  • Real-time, batch, asynchronous, serverless (level 8)
๐Ÿ‘€ Monitor

Model Monitor

  • Continuous or scheduled checks
  • Alerts on data quality, model quality, bias drift, feature attribution drift

Where you work: SageMaker Studio

A web interface that opens everything: prepare data, train, deploy, monitor. Inside it you can use:

๐Ÿ““ JupyterLab

Notebooks, code and data.

๐Ÿ–ฑ๏ธ Canvas

No-code ML and AutoML.

๐Ÿ“Š RStudio

For the R language.

๐Ÿ’ป Code Editor

Based on VS Code, with extensions.

๐Ÿš€ JumpStart

Pre-trained models to start from.

โš–๏ธ Model evaluations

Check LLM quality and responsible AI.

๐Ÿงฉ Game: pick the SageMaker feature
Which feature does the job?

๐Ÿ Checkpoint

You want to clean and transform data with almost no code. Useโ€ฆ

Run many training jobs with different hyperparameters and keep the best:

๐ŸŽ‰ Level 4 cleared! +50 XP
5

Level 5 of 8, about 8 minutes

Where do models come from?

Goal: choose between a ready model and building your own.

Four ways to get a model in SageMaker AI, from least effort to most:

1

๐ŸŽ Pre-trained models (JumpStart)

Least effort. Deploy as-is, or fine-tune first. From popular model hubs, with ready-made solution templates.

2

๐Ÿงฐ Built-in algorithms

More effort. AWS provides the algorithm; you bring the data. Scales well to large datasets.

3

๐Ÿ Your code in a pre-made image

No built-in fits? Write your own script using scikit-learn, TensorFlow, PyTorch, MXNet or Chainer in an AWS-provided container.

4

๐Ÿณ Your own Docker image

Most effort, most control. Install anything you need.

Rule of thumb: start at step 1 and only move down the ladder when you must. Effort and cost go up at every step.

Built-in algorithms by problem type

๐Ÿท๏ธ

Supervised

Classification and regression: predict a label or a number.

๐Ÿงฉ

Unsupervised

Clustering, dimension reduction, topic modelling, anomaly detection.

๐Ÿ–ผ๏ธ

Image processing

Image classification, object detection, computer vision, time series.

๐Ÿ“

Text analysis

Document classification and summarisation, topic modelling, transcription and translation.

The notes list only the most common ones. The SageMaker AI documentation has the full list.

๐ŸŽฏ Game: which option?
Pick the cheapest option that solves the problem.

๐Ÿ Checkpoint

Which option needs the least effort?

You need an unusual library that no AWS image has. Useโ€ฆ

๐ŸŽ‰ Level 5 cleared! +50 XP
6

Level 6 of 8, about 12 minutes

Model fitting: the three students

Goal: spot underfitting and overfitting, and know the fixes.

Model fitting = training a model to learn the link between input (X) and output (Y). For example: study hours โ†’ marks.

Three students, three models

๐ŸŽš๏ธ Try it: find the good fit
Slide the model complexity and watch both errors. Aim for the lowest error on new data.
Training error
New data error
ModelTraining accuracyTesting accuracyBiasVarianceGeneralisation
UnderfittingLowLowHighLowPoor
Good fitHighHighModerateModerateExcellent
OverfittingVery highLowLowHighPoor
๐Ÿ“

Bias

Error from assuming things are too simple. The model canโ€™t capture the real relationship.

๐ŸŒ€

Variance

Sensitivity to the exact training examples. Change the data a little and the model changes a lot.

Salary example. Underfit: salary depends only on age. Good fit: experience, education, skills, location, industry. Overfit: the model โ€œlearnsโ€ employee ID and office chair number, which mean nothing for new employees.
๐Ÿฉบ Game: diagnose the model
Read the two scores and give your diagnosis.
๐Ÿ”ง

Fix underfitting

More complex model (linear โ†’ polynomial or random forest), add features, train longer, reduce regularisation.

๐Ÿ›ก๏ธ

Fix overfitting

More data, cross-validation, simpler model, regularisation (L1/L2), prune trees, dropout, early stopping, feature selection, ensembles.

AlgorithmUnderfitting riskOverfitting risk
Linear regressionHighLow
Decision treeLowVery high
Random forestLowLow
XGBoostLowMedium
KNN, small KLowHigh
KNN, large KHighLow
Neural networkLowHigh without regularisation
Key takeaway The goal is not the highest training accuracy. It is good generalisation: doing well on new, unseen data.

๐Ÿ Checkpoint

Training loss keeps falling while validation loss rises. This isโ€ฆ

High bias and low variance meansโ€ฆ

๐ŸŽ‰ Level 6 cleared! +50 XP
7

Level 7 of 8, about 10 minutes

Measuring a model

Goal: read a confusion matrix and pick the right metric.

Evaluation happens after training, on the validation and test sets. Which numbers you look at depends on the problem type.

๐Ÿ“ง Try it: spam filter, move the line
Each square is an email. ๐ŸŸฅ real spam, ๐ŸŸฆ real mail. The model gives each a spam score. Move the threshold and watch the metrics fight each other.
Model says SPAM
Model says OK
Really spam
caught (TP)
missed (FN)
Really fine
false alarm (FP)
correct (TN)
Accuracy
Precision
Recall
F1 score

๐ŸŽฏ

Precision

Of everything it flagged, how much was right? Low precision = real mail lands in spam.

๐Ÿ•ธ๏ธ

Recall

Of all the real spam, how much did it catch? Low recall = spam in your inbox.

โš–๏ธ

F1 score

One number balancing precision and recall.

๐Ÿ“ˆ

AUC

How well the model separates the two classes across all thresholds.

โš ๏ธ Accuracy can lie. If only 2 emails in 100 are spam, a model that says โ€œnot spamโ€ every time is 98% accurate and catches nothing.

Predicting numbers instead? Use regression metrics

MAE

Average size of the error, in the same unit (โ‚น, ยฐC).

RMSE

Like MAE but punishes big mistakes much more.

Rยฒ

How much of the variation the model explains. 1.0 is perfect.

๐Ÿ“ Game: choose the metric
Which number matters most here?

๐Ÿ Checkpoint

A cancer screening model must not miss sick patients. Optimiseโ€ฆ

Predicting house prices in rupees. A good metric isโ€ฆ

๐ŸŽ‰ Level 7 cleared! +50 XP
8

Level 8 of 8, about 12 minutes

Deploy it, then keep it alive (MLOps)

Goal: choose a deployment option and explain what MLOps adds.

Deployment = putting the model and its resources into production so it can make predictions.
๐Ÿ 

Self-hosted API

Your own servers or containers. Full control, maybe cheaper, but you manage web servers, load balancers and databases.

โ˜๏ธ

Managed API

SageMaker AI hosts it: one click or one API call, automatic scaling, HTTPS endpoints that can hold several models.

Four SageMaker AI inference options

โšก

Real-time

Interactive, low latency. A live endpoint.

๐Ÿ“ฆ

Batch transform

Big datasets, no permanent endpoint. Also good for cleaning data before training.

โณ

Asynchronous

Queues requests. Large payloads (up to 1 GB), long processing (up to 1 hour).

๐Ÿ’ค

Serverless

Quiet periods between spikes, and you can accept a cold start. No infrastructure to manage.

๐Ÿšš Game: pick the deployment option
Which inference option fits?

MLOps = people + process + technology

MLOps means running the whole ML lifecycle in a systematic, repeatable way: develop, deploy, monitor, retrain. It is DevOps, adapted for models.
Why models need it. A normal app behaves the same next year. A model is sensitive to data: one that works today can quietly get worse in weeks, because the world changed. So it needs monitoring and retraining, not just a release.

5 benefits

โšก Productivity

Self-service environments and curated data. Less waiting.

โœ… Reliability

CI/CD means quick deployments with consistent quality.

๐Ÿ” Repeatability

Automate every step, so results can be reproduced.

๐Ÿ” Auditability

Version data, code and models: show exactly how a model was built.

๐Ÿ“Š Data and model quality

Enforce policies against bias, track drift over time.

๐Ÿค Collaboration

Data scientists, engineers and IT operations working as one team.

4 key principles

๐Ÿ—ƒ๏ธ Version control

Track changes to data, code and models. Roll back when needed.

๐Ÿค– Automation

Automate ingestion, preprocessing, training, validation and deployment. Automated tests catch problems early.

๐Ÿ”„ CI/CD

Continuous integration, delivery, training (retrain automatically) and monitoring.

๐Ÿ›๏ธ Model governance

Documentation, reviews and approvals before deployment. Check fairness, bias and ethics. Protect sensitive data.

๐Ÿญ Try it: the automated pipeline
Press โ€œNext stepโ€ to watch a model travel from build to production.
1. Model buildNew data arrives โ†’ pipeline trains a new model
2. EvaluationQuality gate: meets the baseline metrics?
3. ApprovalRegistered in the Model Registry and approved
4. DeploymentSource โ†’ build โ†’ staging โ†’ tests โ†’ production
5. In productionMonitor infrastructure, data quality and model performance

AWS services for MLOps

StepService
Prepare dataSageMaker Data Wrangler, Processing API
Store featuresSageMaker Feature Store
TrainSageMaker training jobs
Compare runsSageMaker Experiments
Process and evaluateSageMaker Processing
Catalogue and approve modelsSageMaker Model Registry
DeploySageMaker inference options
MonitorSageMaker Model Monitor
Tie it all togetherSageMaker Model Building Pipelines

๐Ÿ Checkpoint

Requests up to 1 GB that take several minutes needโ€ฆ

Which MLOps principle lets you prove how a model was built?

๐ŸŽ‰ Level 8 cleared! +50 XP. Your wheel is complete!
๐Ÿ—บ๏ธ

The big picture: mind map

Everything on one page. Click a branch to jump to its level.

๐Ÿƒ

Flashcards

Tap to flip. Mark each card. Keep going until the โ€œreview againโ€ pile is empty.

โšก

Myth or fact?

Quick-fire. Decide fast.

๐Ÿ‘น

Boss battle

10 questions. 3 hearts. Can you beat the Drift Monster?

Quest progress

ML Solutions Builder

๐Ÿ“– Next step: read the Day 3 notes

You know the map now. In the notes, look for:

  • The exact wording of the 7 lifecycle phases
  • The full Amazon call centre story, phase by phase
  • Every SageMaker AI feature and what it does
  • The complete underfitting / good fit / overfitting comparison tables
  • The MLOps benefits, principles and AWS service map