Books › AI Foundations: from zero

Chapter 2 ยท 4 min read

What do we mean by AI?

In one sentence: AI is software that does jobs that normally need human judgement, and most of today's AI gets there by learning from examples instead of following hand-written rules.

What is AI?

Artificial intelligence means a computer doing something that, until recently, only a person could do well. Spotting a face in a photo. Understanding a spoken sentence. Guessing which film you will enjoy. Writing a short reply to an email.

Notice the word "artificial". The computer is not alive and has no feelings. It is software that is good at certain jobs.

Two ways to teach a computer

Imagine Asha wants her computer to sort customer messages into "order", "question" and "complaint". There are two ways to do it.

Two columns. On the left, rules: you write every step, and it breaks when tricksters change the words. On the right, learning: you show examples and the computer finds the pattern itself. A bar at the bottom says most of today's AI learns from examples.

Way 1: write rules. "If the message contains the word *order*, call it an order." This works at first. Then a customer writes, "Can I get twenty rolls for Friday?" There is no word *order* in it. Asha must add another rule. Then another. The list never ends.

Way 2: show examples. Asha gives the computer a thousand real messages, each already sorted by a person. The computer studies them and finds the patterns by itself. It can now sort new messages it has never seen.

This second way is called machine learning, and it is the heart of modern AI. The rest of the book depends on it.

The family tree

People use the words AI, machine learning, deep learning and generative AI as if they were the same. They are not. They fit inside each other, like nesting boxes.

TermPlain meaningExample
AIAny computer system doing a job that needs judgementA spam filter, a route planner, a chatbot
Machine learningAI that learns patterns from examplesA spam filter trained on marked emails
Deep learningMachine learning that uses many layers of tiny deciders (Chapter 4)Recognising faces in photos
Language modelDeep learning that works with words and writes text (Chapters 6 to 8)The engine inside a chatbot
Generative AIAI that makes new things: text, pictures, sound, codeWriting a poem, painting a picture

So every language model is deep learning. Every deep learning system is machine learning. And every machine learning system is AI. But not every AI is a chatbot.

Two kinds of jobs

  • Sorting and predicting. Is this email junk? Will this customer come back? How many loaves will we sell tomorrow? The answer is a label or a number.
  • Making new things. Write a reply. Draw a cake. Write some code. This is generative AI. It creates something that did not exist before, based on the patterns it learned.

Narrow, not magic

Today's AI is good at the jobs it was trained for, and often bad at everything else. A chess program cannot bake bread. A photo recogniser cannot write a poem. Chatbots feel more general, because language touches everything. But they still make odd mistakes, as Chapter 9 explains.

Three myths to drop early:

  • "AI thinks like a person." It does not. It finds patterns in data.
  • "AI knows the truth." It does not. It produces what fits the patterns, and that is sometimes wrong.
  • "AI is one thing." It is a family of methods. Different jobs use different tools.

Back to Asha

For her messages, Asha picks learning, not rules. She has about a year of old messages and her own notes on what each one was. That is her data. In the next chapter we see how a computer turns that data into a working sorter.

Words explained

  • Artificial intelligence (AI): a computer system doing a job that normally needs human judgement.
  • Machine learning: a way of building AI by letting the computer learn patterns from examples.
  • Deep learning: machine learning with many layers of tiny deciders.
  • Generative AI: AI that creates new content.
  • Rules-based system: software that follows steps a person wrote by hand.

The limits of this chapter

  • The boundaries between these words are fuzzy, and people argue about them. The nesting boxes are a helpful picture, not a law.
  • Rules are not "bad". For simple, fixed, high-stakes jobs, such as calculating tax, plain rules are often better than learning. Many real systems combine both.

For engineers

  • Before machine learning became dominant, much AI was symbolic: hand-built rules and logic, such as expert systems. Rule-based components are still common in production, especially for hard limits and policy checks.
  • Machine learning learns a function from data. Supervised learning uses labelled examples, unsupervised learning finds structure without labels, and reinforcement learning learns from reward signals. Chapter 3 covers the first two, and Chapter 8 touches the third.
  • A generative model learns the distribution of its training data well enough to sample new items from it. A language model is a generative model over sequences of tokens.

Check yourself

  • What are the two ways to teach a computer to sort messages? Answer: Write rules by hand, or show it labelled examples and let it learn the pattern.
  • Is every AI a chatbot? Answer: No. A chatbot is one kind of AI. Spam filters, route planners and photo recognisers are AI too.
  • Name one thing today's AI is bad at. Answer: Anything outside the job it was trained for. Even chatbots make confident mistakes.
Plain-words explanations in the author's own words. The examples are invented, and no real company, product or customer is described. Simplified on purpose: where a detail matters, the "For engineers" part says so. Disclaimers