Module 14 · Teaching With Examples

What are the steps between “I have a question” and “the model is running”?

Lesson 14.4 · How an AI Gets Built

Ashley · Felix

Question, data, train, grade, launch, watch, retrain. Around again.

Ashley wants a model that predicts views.

She has a question and a spreadsheet.

Between those and a working model is a loop that every AI project in the world goes around, usually more than once.

Felix draws it on a napkin. It’s the last napkin the cafeteria has.

The short answer

Question, data, train, grade, launch, watch, retrain, and back to data. Ashley is at “data,” with sixteen rows and a bad feeling that sixteen isn’t many. Module 18 will confirm the feeling.

Try it yourself

Tap each stage of the build loop to see what it means for Ashley’s views question.

QuestionDataTrainGradeLaunchWatchRetrain

Tap a stop to see where the data goes and who ends up with it.

What you just did has a name

The machine learning lifecycle

The build loop is the machine learning lifecycle.

It starts with a question and never quite ends, because a launched model has to be watched and retrained as the world moves.

This loop shows up again in every later module, with the current stage lit up.

A few more things

Most of the loop isn’t “AI”

Question, data, grading, watching. Four of the seven stages are asking, cleaning, checking and monitoring. The training step gets the headlines and a small share of the hours.

Grading is the honesty step

A model graded on the data it trained on always looks great. Grading on held-out data is how you find out whether it learned or memorized. Module 18 is that step, in full.

The arrow back to data

A model that grades badly sends you back for more or better data, not a fancier model. Ashley’s sixteen videos are going to send her back more than once.

Go deeper

The longer version, if you want it.

Why launched models drift

A model learns the world as it was in the training data. The world moves: a new game gets popular, viewers’ habits shift, a platform changes its feed. The model’s guesses get slowly worse without a single line of code changing. Teams call this drift, and it’s why “watch” and “retrain” are stages rather than afterthoughts.

The famous failure shape: a model launched with 95 percent accuracy that nobody re-checks, quietly degrading for a year. The build loop exists to make “when did we last grade this?” a standing question.

Quick check

An animal shelter wants a model that guesses how long each dog will wait to be adopted. They’ve just finished cleaning two years of intake records. What comes next?

Let’s take it slower

Picture it as a school year that never ends. Ask a question, gather the data, train the model, grade it on rows it never saw, put it to work, keep checking its marks, and when they slip, feed it fresh data and go around again. Every stage exists because the one before it can go wrong quietly. Training gets the attention. The checking stages are where the hours go. If somebody tells you a model is finished, ask when it was last graded and on what.

More examples

1

The fraud model’s refresh

A bank’s card-fraud model gets retrained every few weeks, because scammers change tactics as soon as the old ones stop working. Launch was years ago. The loop never stopped.

2

The bakery forecast

A supermarket’s model for how much bread to bake was trained on normal years. Then a heat wave hit and bread sales dropped. The watch stage caught it in two days, and the retrain step added a weather column.

Back to the question

So what are the steps?

Show the answer

Question, data, train, grade, launch, watch, retrain, and back to data. Ashley is at “data,” with sixteen rows and a bad feeling that sixteen isn’t many. Module 18 will confirm the feeling.

More on this: What is machine learning?

One last question

Why is the build loop a loop instead of a line?

Talk Card

Talk Card · 14.4

Every AI goes around the same loop: question, data, train, grade, launch, watch, retrain. It’s a loop because the world keeps changing.

Data to AI · pettigrewlab.com/learn

Next lesson