What is Artificial Intelligence?

In one line Artificial Intelligence (AI) is the field of building computer systems that perform tasks which normally need human intelligence, such as understanding language, recognising images, making decisions and solving problems.

The term was coined by John McCarthy in the 1955 proposal for the Dartmouth Summer Research Project on Artificial Intelligence (held in 1956), which set out to study the conjecture that "every aspect of learning or any other feature of intelligence can in principle be so precisely described that a machine can be made to simulate it."

Today "AI" is used as an umbrella term. A chess engine, a spam filter, a face-unlock system on a phone and a chatbot like ChatGPT or Claude are all AI systems, but they work in very different ways. Russell and Norvig, in the standard textbook Artificial Intelligence: A Modern Approach, describe AI as the study of agents that perceive their environment and act to achieve goals as well as possible.

Analogy Think of AI as "medicine": a broad field with many specialities. Machine learning is one speciality (like surgery), deep learning is a technique inside it (like keyhole surgery), and generative AI is one application of that technique.

AI vs Machine Learning vs Deep Learning vs Generative AI

These four terms are nested inside each other, as the figure at the top of this page shows. Every deep learning system is a machine learning system, and every machine learning system is an AI system, but not the other way round.

TermWhat it meansHow it gets its behaviourExamples
Artificial IntelligenceAny technique that makes a machine act intelligentlyHand-written rules, search, logic, or learning from dataChess engines, route planners, expert systems, all of the below
Machine Learning (ML)AI that learns patterns from data instead of being explicitly programmedAn algorithm fits a model to examplesSpam filters, credit scoring, recommendation systems, decision trees, gradient boosting
Deep Learning (DL)ML using neural networks with many layersLearns its own features from raw data (pixels, audio, text)Image recognition (CNNs), speech recognition, machine translation
Generative AI (GenAI)Deep learning models that create new contentLearns the distribution of its training data and samples from itChatGPT, Claude, Gemini (text); Stable Diffusion, DALL·E (images)
Large Language Model (LLM)A generative model trained on huge amounts of text to predict the next tokenTransformer neural network, billions of parametersGPT-4o, Claude, Llama, Mistral, Qwen (see How LLMs work)

Narrow, general and super AI

AI is also classified by how broad its abilities are:

  • Narrow AI (weak AI): built for a specific task or a set of related tasks. Every AI system that exists today is narrow AI, including LLMs, even though they handle many language tasks.
  • Artificial General Intelligence (AGI): a hypothetical system that can learn and perform any intellectual task a human can, and transfer knowledge between domains. There is no agreed definition or test for it.
  • Artificial Superintelligence (ASI): a hypothetical system that exceeds human ability in practically every domain.
Note You will also see AI described by approach: symbolic AI (rules and logic written by people, popular from the 1950s to the 1980s) and connectionist or statistical AI (learning from data, especially neural networks, which dominates today).

How machines learn: programming vs learning

In traditional programming, a person writes the rules. In machine learning, the person supplies examples with the correct answers, and the algorithm works out the rules (the model) by itself.

Traditional programming compared with machine learning Traditional programming Machine learning Data Rules (code) Computer Answers A person writes: "if the email contains 'lottery' then spam" Data Answers (labels) Learningalgorithm Rules(the model) The algorithm sees 10,000 emails marked spam / not spam and learns which patterns predict spam
Figure 1. In machine learning the rules are an output of training, not an input.

The learned model is a mathematical function with adjustable numbers called parameters (or weights). Training means finding the parameter values that make the model's predictions match the examples as closely as possible. For more depth, see my page on Machine learning fundamentals.

Types of learning

TypeWhat the model getsWhat it learnsTypical tasks
SupervisedInputs with correct answers (labels)A mapping from input to answerClassification (spam / not spam), regression (house price)
UnsupervisedInputs without labelsStructure hidden in the dataClustering customers, dimensionality reduction, anomaly detection
Self-supervisedRaw data; the labels are created from the data itselfGeneral-purpose representationsPredict the next word (how LLMs are pre-trained), fill in a masked word (BERT)
ReinforcementAn environment that gives rewards or penaltiesA strategy (policy) that maximises total rewardGame playing (AlphaGo), robotics, and RLHF for chatbots
Reinforcement learning loop between agent and environment Agent Environment action at new state st+1 and reward rt+1
Figure 2. In reinforcement learning the agent learns by trial and error from rewards.

Neural networks in one picture

Deep learning uses artificial neural networks, loosely inspired by neurons in the brain. Each artificial neuron computes a weighted sum of its inputs, adds a bias, and passes the result through a non-linear activation function \(f\):

\( y = f\left(\sum_{i=1}^{n} w_i x_i + b\right) \)

Neurons are arranged in layers. "Deep" simply means there are many hidden layers between the input and the output. Modern LLMs are neural networks with tens to hundreds of layers and billions of weights.

A feed-forward neural network with an input layer, two hidden layers and an output layer Input layere.g. pixel values Hidden layerslearn features (edges → shapes → objects) Output layere.g. "cat" / "dog" x₁x₂x₃
Figure 3. A small feed-forward network. Every line is a weight learned during training.

For a deeper treatment of neurons, back-propagation and optimisers, see my Deep learning page.

Training vs inference

Every ML model has two phases in its life:

  • Training: the model sees examples, measures how wrong it is with a loss function, and adjusts its weights using gradient descent and back-propagation. This is slow and expensive and happens once (or occasionally).
  • Inference: the trained model, with its weights fixed, is used to make predictions on new inputs. This is what happens every time you send a message to a chatbot.
Training loop compared with inference Training (weights change) Training data Model Prediction Loss(how wrong?) Update weights(gradient descent) repeated millions of times Inference (weights fixed) New input Trainedmodel Output fast, runs every time you use the model
Figure 4. Training adjusts weights in a loop; inference only uses them.
Important consequence A chatbot does not learn from your conversation by changing its weights. Within a conversation it only "remembers" what is in its context window. It may know nothing about events after its training cutoff date unless it is given tools such as web search.

Discriminative vs generative models

Discriminative modelGenerative model
Question it answers"Which class does this input belong to?""What does data like this look like? Make a new one."
Probability learned\(P(y \mid x)\): label given input\(P(x)\) or \(P(x \mid \text{prompt})\): the data itself
OutputA label, score or numberNew text, images, audio, code
ExamplesLogistic regression, SVM, image classifiers, BERT classifiersGPT, Claude, Llama, diffusion models, GANs, VAEs

A short history of AI

Timeline of key milestones in AI from 1950 to 2022 1st AI winter (~1974–80) 2nd winter (~1987–93) 1950Turing test 1956Dartmouth:"AI" named 1966ELIZA chatbot 1986Backpropagationpopularised 1997Deep Blue beatsKasparov 2012AlexNet: deeplearning takes off 2016AlphaGo 2020GPT-3 2013word2vec 2017–18Transformer,BERT, GPT-1 2022ChatGPT Not to scale. "AI winters" were periods of reduced funding and interest after expectations were not met.
Figure 5. Key milestones in the history of AI.
YearMilestoneWhy it mattered
1950Alan Turing, "Computing Machinery and Intelligence"Proposed the "imitation game" (Turing test) as a way to discuss machine intelligence
1956Dartmouth workshopFounding event of AI as a research field
1958Rosenblatt's perceptronAn early trainable artificial neuron
1966ELIZA (Joseph Weizenbaum, MIT)Early chatbot using pattern matching; people attributed understanding to it
1980sExpert systemsRule-based AI in industry; hard to maintain, which contributed to the second AI winter
1986Rumelhart, Hinton & Williams on back-propagationMade training multi-layer neural networks practical
1997IBM Deep Blue defeats Garry KasparovSearch-based AI beats the world chess champion
2012AlexNet wins ImageNetDeep CNNs trained on GPUs cut image-recognition error sharply; start of the deep learning era
2013word2vecWords represented as dense vectors (embeddings) that capture meaning
2016DeepMind AlphaGo defeats Lee SedolDeep learning + reinforcement learning masters Go
2017"Attention Is All You Need" (Transformer)The architecture behind every modern LLM
2018BERT (Google) and GPT-1 (OpenAI)Pre-train on large text, then adapt: the foundation-model approach
2020GPT-3 (175 billion parameters)Showed that a large model can do new tasks from a few examples in the prompt
2022ChatGPTInstruction-tuned chat model brought LLMs to the general public
2023 →GPT-4, Claude, Llama, Gemini, Mistral, Qwen …Multimodal models, open-weight models, tool use and agents

Key terms

  • ModelA mathematical function learned from data that maps inputs to outputs.
  • Parameters / weightsThe numbers inside a model that are adjusted during training.
  • FeatureA measurable property of the input used by the model.
  • LabelThe correct answer attached to a training example.
  • Loss functionMeasures how far the model's prediction is from the correct answer.
  • OverfittingMemorising the training data instead of learning patterns that generalise.
  • Foundation modelA large model pre-trained on broad data that can be adapted to many tasks.
  • Training cutoffThe date after which a model has no knowledge from its training data.

Common misconceptions

MisconceptionReality
"AI and machine learning are the same thing."ML is one approach to AI. Rule-based and search-based systems are AI too.
"Neural networks work like the human brain."They are loosely inspired by neurons, but they are mathematical functions trained by calculus, not biological simulations.
"The AI understands like a person."Models learn statistical patterns. They can be very capable, but they can also fail in ways no human would.
"More data always means a better model."Data quality, relevance and labelling matter as much as quantity. Biased data gives biased models.

Next step: language is the domain where AI has advanced fastest recently. Continue with Natural Language Processing and then How LLMs work.

References

Papers & primary sources

Books

  • Artificial Intelligence: A Modern Approach (4th ed.) — Stuart Russell, Peter Norvig. aima.cs.berkeley.edu
  • Deep Learning — Ian Goodfellow, Yoshua Bengio, Aaron Courville (MIT Press, 2016). Free online: deeplearningbook.org
  • Hands-On Machine Learning with Scikit-Learn, Keras & TensorFlow — Aurélien Géron (O'Reilly)
  • The Master Algorithm — Pedro Domingos (non-technical overview of ML approaches)

Courses & videos


Some other interesting things to know: