Read a sample: 1. Meeting AI in an Ordinary Day
Before breakfast, you might encounter three predictions without asking for any of them.
Your email app has quietly moved a message into a spam folder. A navigation app estimates that your trip will take twenty-eight minutes. A streaming service places a documentary near the top of your screen because it thinks you may be interested.
These moments feel different. One removes something from view, one offers a number, and one suggests what to watch. Yet each involves a similar question: given the information available, what is likely to happen or be true?
The email filter tries to distinguish unwanted messages from legitimate ones. The navigation app estimates a future travel time. The streaming service guesses which items are worth showing you. None has direct access to a perfect answer. Each must work with clues.
This book is about understanding those clues, the examples from which systems can learn, and the practical choices behind their predictions. You do not need to write code or have a technical background. You do need a willingness to ask ordinary questions: What information is being used? What is the system trying to predict? What happens when it gets the answer wrong?
Let’s begin with a day that is probably more familiar than it first appears.
Imagine opening your email and finding a message from a small community theater in your spam folder. It announces a change to the time of a performance you plan to attend. The message is legitimate, but its subject line is written in capital letters, and the sender is not someone you correspond with often.
A spam filter may use clues like these, along with other information, to judge whether a message resembles unwanted mail. Some filters use patterns learned from many examples of messages that people or other processes have labeled. The filter then applies what it has learned to messages it has not seen before.
That does not mean the filter understands the theater’s intentions as a person might. It does not know that you have tickets, that you are looking forward to the performance, or that missing the time change would be inconvenient. It produces a judgment from the information available to it.
The judgment is a classification: placing something into a category. In this simplified example, the categories are “spam” and “not spam.” A real email service may use additional categories or combine several checks, but the basic question remains recognizable: what kind of message is this likely to be?
The theater message shows why the answer can be difficult. Capital letters might appear in many unwanted messages, but they also appear in perfectly useful announcements. An unfamiliar sender could be a scammer, a new colleague, or someone confirming an appointment. A clue can be useful without being proof.
There is also a consequence to the filter’s decision. If it sends a legitimate message to spam, you might miss something important. If it leaves unwanted mail in your inbox, you may have to sort through clutter or encounter a misleading message. A filter cannot make those consequences disappear merely by being confident.
Later in the book, we will look closely at how a filter can learn from labeled examples and how its settings affect the kinds of mistakes it makes. For now, notice the shape of the problem: the system observes features of a message and predicts a category.
Now imagine you need to drive across town. Your navigation app offers two routes. One is estimated at twenty-eight minutes; the other, thirty-two.
The app is answering a different kind of question from the spam filter. It is not deciding whether the trip belongs in a category called “spam.” It is estimating a number: how long the journey is likely to take under the conditions it can account for.
A travel-time estimate may draw on information such as the route, the time of day, historical journey times, and available reports about current traffic. The exact information depends on the service and what it has access to. A learned model can use examples of earlier trips or traffic conditions to find patterns that help estimate a new trip.
The estimate is useful precisely because the future is not yet known. You want an answer before you set off, not a record of how long the journey took after you arrive.
That also makes uncertainty unavoidable. A delay could develop after the estimate appears. Road conditions may differ from what the app has observed, or the trip may not follow the assumed route. An estimate of twenty-eight minutes is not a promise that the journey will end exactly twenty-eight minutes later.
The route choice involves more than the prediction itself. Perhaps the slightly slower route avoids a difficult intersection. Perhaps you prefer a familiar road, need to make a stop, or want a more comfortable journey. The app’s estimate can inform your decision without settling it.
Here, the pattern is: the system observes information about a possible trip and predicts a numerical outcome. In later chapters, we will examine how past examples can support such estimates and why changing conditions can make them less reliable.
In the evening, you open a streaming app. It highlights a documentary about an artist. You had not searched for it, but you watched a film about design last week, and the suggestion catches your eye.
This is a recommendation problem. The service has many…