← All posts

AI basics › From statistics to AGI

What is AI? Artificial intelligence and where LLMs fit in

What artificial intelligence means, how the field began at Dartmouth in 1956, and how machine learning, deep learning, and LLMs fit inside it, with an example.

These days the word AI turns up almost everywhere. It’s in the news, in the names of features on your phone, and in product announcements of every kind. Chat services like ChatGPT, Claude, and Gemini, which let anyone talk to an AI in plain language, are probably a big reason it’s heard so often. Still, if someone asked you what AI actually is, the answer may not come as easily as the word does.

Artificial intelligence, or AI, is the research and technology of getting machines to do things we think require human intelligence. Understanding speech, recognizing what’s in a picture, and making a judgment from experience are all examples. John McCarthy, who gave the field its name, described it as “the science and engineering of making intelligent machines, especially intelligent computer programs” (What is artificial intelligence?). Even so, there’s no definition that everyone agrees on yet. Stanford’s One Hundred Year Study on AI (AI100) even wrote in its 2016 report that the lack of a precise definition has probably helped the field grow (Defining AI).

This is the fifth post in the series “From statistics to AGI.” The LLMs from the previous post are one branch of this much larger field. So this time I’ll step back and look at where the name came from, how the field changed, and how the terms you keep hearing fit inside one another.

A name from a 1955 proposal

The name artificial intelligence goes back to a research proposal. On August 31, 1955, John McCarthy, Marvin Minsky, Nathaniel Rochester, and Claude Shannon proposed a two-month study of artificial intelligence by ten researchers at Dartmouth College the following summer (the proposal). The AI100 report credits McCarthy with the first use of the term in that proposal, and it treats the 1956 workshop as the moment the field was officially born (A short history of AI).

The proposal starts from the conjecture that every aspect of learning, or any other feature of intelligence, can in principle be described so precisely that a machine can be made to simulate it. Neuron nets were on its list of topics too, so the idea of a machine that learns was there from the start.

When AI meant rules written by hand

For the next few decades, though, the main current was symbolic AI. It writes knowledge down as symbols and rules that people can read, then reasons over them to reach conclusions. Expert systems were where this approach became most practical, with a knowledge engineer interviewing experts and putting their knowledge into a program. MYCIN, from 1974, which McCarthy names as one of the first, diagnosed bacterial infections of the blood and suggested treatments (Applications of AI). Most of its knowledge was written as rules of the form “if there is evidence that A and B are true, conclude there is evidence that C is true” (Rule-Based Expert Systems). As McCarthy points out, though, MYCIN knew about bacteria, symptoms, and treatments but had no notion of patients, death, or recovery.

Knowledge written by hand only reaches as far as what people put in, and the hopes had run well ahead of that. In a report commissioned by the UK’s Science Research Council and published early in 1973, James Lighthill judged that in no part of the field had the discoveries so far produced the major impact that was then promised (the report). According to the archive that hosts it, the report set off a massive loss of confidence in AI across UK academia and its funding body, which lasted for almost a decade (overview). The AI100 report describes a similar time in the mid-1980s, when interest fell and funding dried up. Periods like these, when expectations collapse and money and attention leave, are called AI winters.

The same task, solved with rules and with learning

The difference between writing rules and learning them is easier to feel in code. Below, I sort short messages into spam and ham (messages that aren’t spam) in both ways. First comes the older way, where a person picks the words that give spam away.

import re

# The older way: a person writes the rule
SPAM_WORDS = {"free", "winner", "prize", "click"}

def by_rule(text):
    words = set(re.findall(r"[a-z]+", text.lower()))
    return "spam" if words & SPAM_WORDS else "ham"

Next is the machine learning way, where instead of a word list I give it twelve messages with the right answers attached. CountVectorizer turns each message into word counts, and MultinomialNB is a naive Bayes classifier, which learns how often each word shows up in spam and in ham. The scikit-learn documentation notes that naive Bayes has worked well for spam filtering and needs only a small amount of training data (Naive Bayes).

from sklearn.feature_extraction.text import CountVectorizer
from sklearn.naive_bayes import MultinomialNB

# The machine learning way: learn from labeled examples
examples = [
    ("Win a free prize now", "spam"),
    ("Claim your cash reward today", "spam"),
    ("Cheap loans, apply now", "spam"),
    ("Limited offer, buy one get one free", "spam"),
    ("You won a gift card, click to claim", "spam"),
    ("Lowest price on meds, order today", "spam"),
    ("Can we move the meeting to Friday", "ham"),
    ("Lunch in the kitchen at noon", "ham"),
    ("Here are the notes from the meeting", "ham"),
    ("Thanks for the photos from the trip", "ham"),
    ("Are you coming to dinner tonight", "ham"),
    ("The report is attached, see you tomorrow", "ham"),
]
texts, labels = zip(*examples)
vec = CountVectorizer()  # turns each message into word counts
model = MultinomialNB().fit(vec.fit_transform(texts), labels)

Now let’s give both of them the same five messages, none of which either has seen.

new = [
    "Claim your free prize today",
    "Free pizza in the kitchen after the meeting",
    "Cheap meds, order now",
    "See you at lunch tomorrow",
    "Your order has shipped",
]
learned = model.predict(vec.transform(new))
print("rule  learned  message")
for text, guess in zip(new, learned):
    print(f"{by_rule(text):5} {guess:8} {text}")
rule  learned  message
spam  spam     Claim your free prize today
spam  ham      Free pizza in the kitchen after the meeting
ham   spam     Cheap meds, order now
ham   ham      See you at lunch tomorrow
ham   spam     Your order has shipped

The rule caught on the word free and flagged an office note about pizza as spam, and it let the ad for meds through because none of its four words were in it. The learned model got both right, having worked out from the examples that words like meeting and kitchen are safe. It did, however, call the shipping notice spam. Let’s look at why.

# Why did the model call "Your order has shipped" spam?
ham_counts, spam_counts = model.feature_count_  # rows follow model.classes_
for word in ["your", "order", "has", "shipped"]:
    i = vec.vocabulary_.get(word)
    if i is None:
        print(f"{word:8} not in the examples")
    else:
        print(f"{word:8} spam {spam_counts[i]:.0f}, ham {ham_counts[i]:.0f}")
your     spam 1, ham 0
order    spam 1, ham 0
has      not in the examples
shipped  not in the examples

The model had seen your and order only in spam, and it had never seen has or shipped, so it left them out. In other words, a rule fails where its author didn’t look ahead, and a learned model fails where its data didn’t reach. That’s why, for work with clear criteria that must be explained exactly, like a tax calculation, writing the rule yourself is simpler and safer. When a pattern is hard to put into words but examples are easy to collect, as with spam, photos, or speech, learning usually does better.

From machine learning to deep learning and LLMs

The second approach is the one that came to lead. According to the AI100 report, AI revived in the 1990s on the view that “Good Old-Fashioned AI” wasn’t enough on its own. The internet’s data, along with the computing power and storage to process it, made statistical techniques that derive solutions from data practical, and the report calls machine learning the key contributor to the AI surge of the past few decades.

Deep learning, which uses neural networks of many layers, went further in the same direction. In 2012, a deep network trained on about 1.2 million ImageNet images reported error rates considerably better than the previous best (the 2012 paper). In 2017 came the Transformer, a design built on a mechanism called attention (Attention Is All You Need), and most of today’s LLMs are built on it. Put together, the terms nest so that each row sits inside the one above it.

Term What it covers Examples
AI Any way of getting machines to do work that seems to need intelligence Expert systems, game search, all the rows below
Machine learning AI that learns its rules from data instead of being handed them The spam model above, recommendations
Deep learning Machine learning with neural networks of many layers Image and speech recognition
LLM Deep learning models trained on huge amounts of text to predict the next token The models behind chat assistants

Statistics has no row, but it isn’t missing. It sits underneath machine learning as the foundation for learning from data and judging how far to trust the result. The keyword rule from the example, on the other hand, belongs only to the first row.

Narrow AI and general AI

Most of the AI in use today is narrow AI, built for one task or a small set of tasks. The spam model above is one, and AlphaGo, which beat Lee Sedol 4-1 in Seoul in March 2016, was a program made for Go (AlphaGo). At the other end is artificial general intelligence, or AGI, an AI that can take on a wide range of tasks the way a person can. When asked whether AI aims at human-level intelligence, McCarthy answered yes. Chat assistants that write, summarize, and code with a single model have since blurred the line, though, and people still disagree about where they stand.

What to check when a product says AI

Because the definition is loose, the word AI ends up on a very wide range of products. The AI100 report even describes an “AI effect,” where a technology people get used to stops being considered AI. Laws, on the other hand, need a line they can apply. Recital 12 of the EU AI Act names the capability to infer as a key trait of AI systems. It also says the definition should not cover systems based on rules defined solely by people to carry out operations automatically (Recital 12). The same recital still counts approaches that infer from encoded knowledge as AI techniques. By that wording, though, perhaps a filter that only looks for fixed words, like the one above, would fall outside.

So when a product says it uses AI, I’d suggest starting with a few plain questions. Ask what it takes in and what it gives back, and whether it follows rules people wrote or a model learned from data. Check how often it’s wrong, how that was measured, and where the data you give it goes. The answers usually tell you more than the word AI does.

If you’re starting out

If you’re new to this, I’d suggest running the example above and adding messages of your own. When I added the ham example “Your order is ready for pickup” and trained again, the shipping notice was still spam. It changed to ham only after I also added “Your package is on its way.” For a wider view without code, Elements of AI is a free course from the University of Helsinki and MinnaLearn. Its first part is designed to need no complicated math or programming.

The next post in the series looks at generative AI, the kind of AI that makes new text, images, and sound. I ran these examples on October 27, 2026, with Python 3.13.12 and scikit-learn 1.9.1.

AI tools helped with the research for this post.