Basic Concepts

Artificial intelligence, large language models, and machine learning are reshaping research across disciplines, including the humanities and social sciences. Understanding how they work, even at a high level, makes you a more critical user and a stronger evaluator of AI-assisted research.

This page gives you a working vocabulary and a mental model of how these systems learn from data. Everything else in these materials (capabilities, failures, bias, evaluation) builds on it. Language Models, later in this unit, looks at how the systems behind chat assistants turn this into text.

Terminology

Terminology in this area is genuinely confusing. The same words mean different things to different people, and press coverage uses AI for everything from a voice assistant, to a self-driving car, to a hypothetical sentient machine. The terms below are nested, from broadest to narrowest.

Nested circles: Artificial Intelligence contains Machine Learning, which contains Deep Learning, which contains Generative AI, which contains Large Language Models.

Artificial Intelligence (AI) is the broadest term: a field with the ambition of building systems that perform tasks we would call intelligent if a human did them. It covers chess engines, spam filters, image recognition, and language generation. The term has been in use since the 1950s (McCarthy et al. [1955] 2006) and carries a lot of historical baggage and hype. It is useful as a category label, but too broad to tell you much about how any specific system works.

Machine Learning (ML) is a subfield of AI in which systems learn patterns from data rather than following hand-coded rules. It is the dominant approach in modern AI. When people talk about training a model, they mean a machine learning process. Nearly everything in these materials falls under ML.

Deep Learning (DL) is a subfield of ML that uses neural networks with many layers (hence deep). It is behind most of the striking AI capabilities of the past decade: image recognition, speech recognition, translation, and language generation. It requires large amounts of data and computing power, which is one reason AI advanced so quickly as both became cheaper (LeCun et al. 2015; Sevilla et al. 2022; Goodfellow et al. 2016, chap. 1).

Generative AI is the category of systems that produce new content (text, images, audio, video, code) rather than only classifying or predicting. It is the term most used in public discussion right now, but it groups together systems with very different designs and behaviours: image generators such as Stable Diffusion (Rombach et al. 2022) or DALL-E are generative AI, and so are LLMs.

Large Language Models (LLMs) are deep learning models trained on massive collections of text: large amounts of text from the web, plus books, code, and other sources (Brown et al. 2020; Grattafiori et al. 2024; Jurafsky and Martin 2026, chap. 7). They learn statistical patterns in language at enormous scale, which lets them generate coherent, contextually appropriate text. ChatGPT, Claude, Gemini, and Llama are built on LLMs. The first three are also the names of chat assistants: applications that let you hold a conversation with an LLM, and that add their own instructions and tools around it. Llama is an open model: its weights are published, so anyone can download it and run it on their own computer.

Why is AI used as a catch-all? Largely for marketing: machine learning model is accurate, but it doesn’t sell products or generate headlines. Noticing this is itself a useful habit when reading coverage of AI.

From Rules to Examples

At the heart of all these terms is one idea: that machines can learn, in a sense, the way people do, from examples. This is the key conceptual shift from traditional computing.

In ordinary software, a programmer writes rules: if the input contains the word 'cat', classify it as an animal. The program does exactly what it was told. It doesn’t learn, adapt, or improve.

In machine learning, no one writes those rules. The system infers them from examples: the rules are derived from data. This is a fundamental shift. To get a system to do what you want, you don’t write logic, you curate examples. You’ll do exactly this in Teachable Machine: as you choose your categories and examples, think about what assumptions you are building in.

Take a task you’ll return to in Unit 3: finding the people mentioned in Robert Louis Stevenson’s letters. With rules, you might write a capitalized word after 'Mr.' or 'Dear' is a person, and you’d immediately drown in exceptions, e.g., Dear Sir, MY DEAR COLVIN. With machine learning, people instead mark every name in thousands of example sentences, and the system works out for itself what names tend to look like. That is how the model you’ll use in Unit 3 was made (Tjong Kim Sang and De Meulder 2003).

How a system actually learns from its examples is the subject of Model Training. But first, what kind of system does the learning?

Neural Networks and Weights

A neural network drawn as columns of circles: an input layer of five neurons, three hidden layers of six, and an output layer of three, with every neuron connected to every neuron in the next layer.

The most common learning architecture is a neural network, a mathematical structure loosely inspired by the brain.

  • A network is made of simple units called artificial neurons, connected to each other.
  • Neurons are organized in layers. Data enters at the input layer, passes through one or more hidden layers that transform it, and emerges at the output layer.
  • Each connection has a weight: a number that determines how the value passing along it changes.
  • A network with many hidden layers is called a deep neural network, which is where deep learning gets its name.

The weights are the key to everything, so it’s worth following some values through a network:

Animation: the values 1 and 2 enter the network, and are multiplied by the weight on each connection they follow. One hidden neuron receives 1 × 1 + 2 × 3 = 7, and another 2 × 2 = 4. The next layers give 26 and 26, and 52 arrives at the output.

Two values, 1 and 2, enter at the input layer. Each connection multiplies the value passing along it by the connection’s weight, and each neuron adds up everything that arrives:

  • The second neuron in the first hidden layer receives only the 2, along a connection with a weight of 2: 2 × 2 = 4.
  • The neuron above it receives both inputs: 1 × 1 + 2 × 3 = 7.
  • The next layer does the same with those results: 7 × 2 + 4 × 3 = 26, then 26 × 1 = 26.
  • Finally, 26 × 2 = 52 arrives at the output layer.

The animation follows only a few connections. In a real network, every neuron combines the values arriving along all its connections, and passes the result through a simple function (the activation function) that lets the network represent complex patterns. But the principle is the same: what comes out depends entirely on the weights. Change any one of them, and the 52 changes too.

And the weights are what the network learns. Before training, they are random, so the output is meaningless. Training nudges each weight up or down, very slightly, over and over, until the network’s outputs come out right for its training examples. A small network like the one in the animation has a few dozen weights, a modern LLM has billions (Brown et al. 2020; Grattafiori et al. 2024; Jurafsky and Martin 2026, chap. 7). Everything a network “knows” is stored in those numbers, and nowhere else.

Different kinds of networks suit different kinds of data. Convolutional networks were long the standard for images. Recurrent networks process sequences one step at a time and were the standard for text until the late 2010s. Transformers, explained in Language Models, have since replaced them for language and are increasingly used for images and audio too (Vaswani et al. 2017; Dosovitskiy et al. 2021; Radford et al. 2022; Goodfellow et al. 2016, chaps. 9–10; Jurafsky and Martin 2026, chap. 7).

Types of Machine Learning

There are several basic ways to train a model. They differ in what the model learns from.

Supervised Learning

Animation: a model receives inputs (orange circles and green squares) together with labels outlining which group each belongs to, and learns to produce outputs sorted into the same two groups.

The model learns from examples that come with the correct answer: inputs paired with labels. Think of teaching with an answer key. To build a model that finds names in text, people annotate thousands of sentences, marking every name and whether it’s a person, a place, or an organization. The model learns patterns that predict those labels, and can then label new text it has never seen. The named-entity recognition (NER) models in Unit 3 were trained this way.

Unsupervised Learning

Animation: a model receives orange circles and green squares with no labels, and sorts them into groups of its own: circles with circles, squares with squares.

There is no answer key. The model looks for structure in the data on its own and groups similar items together. Given all 462 of Stevenson’s letters, unlabelled, it might group them into clusters that turn out to correspond to correspondents, periods, or topics, or to something nobody expected. It is more a tool for exploring and discovering patterns than for confirming known ones, and it’s up to you to work out what the groups mean.

Semi-Supervised Learning

This approach combines a small amount of labelled data with a large amount of unlabelled data. It is useful when labelling is expensive or slow, as it often is for historical and archival material.

Reinforcement Learning

Animation: a model sorts circles and squares into groups. Each result is marked with ticks (rewards) or crosses (penalties), and the feedback goes back into the model, until its groups are right.

The model learns by trial and error: it produces outputs, and each one is scored, rewarded or penalized, and the model adjusts to earn more reward (Sutton and Barto 2018). Think of training a dog: no answer key, just rewards for good behaviour. A version called reinforcement learning from human feedback (RLHF) is a key technique for shaping LLMs: people compare model outputs, and the model is tuned towards the kinds of answers they prefer (Christiano et al. 2017; Ouyang et al. 2022; Bai et al. 2022; Jurafsky and Martin 2026, chap. 8). Much of the behaviour of chat assistants comes from this stage, and from similar kinds of tuning. So do their refusals, which, as the Hack Merlin activity shows, are learned patterns rather than hard rules.

Key Takeaways

  • AI is a broad umbrella. Machine learning, deep learning, generative AI, and LLMs are progressively narrower parts of it, and knowing which one you’re dealing with tells you much more about how a tool behaves.
  • Machine learning systems aren’t given rules: they derive patterns from examples. To get a model to do what you want, you curate examples, and what’s in them shapes everything the model does.
  • A neural network’s output depends entirely on its weights, and the weights are what it learns. Everything it knows is stored in those numbers.
  • Models can learn from labelled examples (supervised), from unlabelled data (unsupervised), or from rewards (reinforcement learning). Chat assistants’ helpfulness and their refusals both come from training on human feedback.
NoteGoing Further

If you want to read more, the following are a good place to start:

  • 3Blue1Brown, Neural Networks: a series of short animated videos that shows what the weights in a network do, and how training adjusts them.
  • McCarthy et al. ([1955] 2006): the 1955 proposal for the summer workshop that gave the field its name. It’s only a few pages long, and its ambitions are worth comparing with today’s claims.
  • Goodfellow et al. (2016), chapter 1: the introduction to a standard textbook, with a readable history of deep learning. Later chapters assume some knowledge of mathematics.

References

Bai, Yuntao, Andy Jones, Kamal Ndousse, et al. 2022. “Training a Helpful and Harmless Assistant with Reinforcement Learning from Human Feedback.” arXiv:2204.05862.
Brown, Tom B., Benjamin Mann, Nick Ryder, et al. 2020. “Language Models Are Few-Shot Learners.” arXiv:2005.14165.
Christiano, Paul, Jan Leike, Tom B. Brown, Miljan Martic, Shane Legg, and Dario Amodei. 2017. “Deep Reinforcement Learning from Human Preferences.” arXiv:1706.03741.
Dosovitskiy, Alexey, Lucas Beyer, Alexander Kolesnikov, et al. 2021. “An Image Is Worth 16x16 Words: Transformers for Image Recognition at Scale.” arXiv:2010.11929.
Goodfellow, Ian, Yoshua Bengio, and Aaron Courville. 2016. Deep Learning. MIT Press.
Grattafiori, Aaron, Abhimanyu Dubey, Abhinav Jauhri, et al. 2024. “The Llama 3 Herd of Models.” arXiv:2407.21783.
Jurafsky, Daniel, and James H. Martin. 2026. Speech and Language Processing: An Introduction to Natural Language Processing, Computational Linguistics, and Speech Recognition, with Language Models. 3rd ed.
LeCun, Yann, Yoshua Bengio, and Geoffrey Hinton. 2015. “Deep Learning.” Nature 521 (7553): 436.
McCarthy, John, Marvin L. Minsky, Nathaniel Rochester, and Claude E. Shannon. (1955) 2006. “A Proposal for the Dartmouth Summer Research Project on Artificial Intelligence, August 31, 1955.” AI Magazine 27 (4): 12–12.
Ouyang, Long, Jeff Wu, Xu Jiang, et al. 2022. “Training Language Models to Follow Instructions with Human Feedback.” arXiv:2203.02155.
Radford, Alec, Jong Wook Kim, Tao Xu, Greg Brockman, Christine McLeavey, and Ilya Sutskever. 2022. “Robust Speech Recognition via Large-Scale Weak Supervision.” arXiv:2212.04356.
Rombach, Robin, Andreas Blattmann, Dominik Lorenz, Patrick Esser, and Björn Ommer. 2022. “High-Resolution Image Synthesis with Latent Diffusion Models.” arXiv:2112.10752.
Sevilla, Jaime, Lennart Heim, Anson Ho, Tamay Besiroglu, Marius Hobbhahn, and Pablo Villalobos. 2022. “Compute Trends Across Three Eras of Machine Learning.” 2022 International Joint Conference on Neural Networks (IJCNN), July 18, 1–8.
Sutton, Richard S., and Andrew G. Barto. 2018. Reinforcement Learning: An Introduction. The MIT Press.
Tjong Kim Sang, Erik F., and Fien De Meulder. 2003. Introduction to the CoNLL-2003 Shared Task: Language-Independent Named Entity Recognition. arXiv:cs/0306050.
Vaswani, Ashish, Noam Shazeer, Niki Parmar, et al. 2017. “Attention Is All You Need.” In Advances in Neural Information Processing Systems, edited by I. Guyon, U. Von Luxburg, S. Bengio, et al., vol. 30. Curran Associates, Inc.