Introduction to AI Lesson 11 of 25

Part 2 · Lesson 1 · 5 min

Learning from examples: input A to output B

What do a spam filter, a translator and ChatGPT have in common?

They look nothing alike. Under the hood, they share one simple shape.

Most machine learning does one job: it takes an input, call it A, and produces an output, call it B. An email goes in, "spam or not" comes out. A sentence in English goes in, the same sentence in French comes out.

The A to B machine

Nothing mysterious is happening. The system has learned a mapping from A to B. And notice who chose A and B: people did. The machine does not pick its own problem.

Some goals have no clear A or B at all. "Make our company better" is a fine wish, but there is no input that goes in and no answer that comes out.

So where does the mapping come from? Think of a new hire who learns a job by studying thousands of past decisions.

The new hire

That is machine learning in one picture. Nobody wrote Pat a rulebook. Pat saw enough examples with the right answer attached, and then handled a new case alone.

One more thing: the machine does not arrive knowing anything about spam. Everything it "knows" came from the examples people gave it.

Go deeper optional

This framing comes from Andrew Ng's course AI for Everyone, where he describes most of today's useful AI as learning an "A to B" mapping from examples.

Try this exercise: write down five A to B pairs from your own work. For each one, ask two questions. Do we have lots of past examples of A with the right B? And would a person with the same information be able to get B from A? If both answers are yes, it is a good candidate.

Check yourself

1. For a model that predicts house prices, what is B?

2. Which goal is hardest to frame as A to B?

3. Where does a spam filter's knowledge come from?