AI Fundamentals

What AI is, where it came from, and how today’s systems actually work under the hood.

Beginner lesson, about 35 minutes, with interactive demos and a quiz.

What you will learn

What we mean by AI

Before you finished your first coffee today, AI had already made dozens of decisions for you. It decided which emails reached your inbox, which route your map suggested, whose face your phone found in last week’s photos, and which word your keyboard guessed next. If you asked a chatbot anything, you talked to one of the largest pieces of software ever trained.

None of those systems resemble the robots of science fiction, and none of them “think” the way you do. Yet each one does something we would call intelligent if a person did it. This lesson is about that gap: what these systems actually are, the handful of ideas they are built from, how we got here, and where they still fall short.

What is it?

Artificial intelligence is the study and engineering of systems that choose good actions in situations their designers did not script step by step. The standard textbook frames it as building rational agents: things that perceive their environment and act to achieve the best expected outcome given what they know.

That definition is deliberately about behaviour, not about brains. It does not require consciousness, understanding or human-like thought. A chess engine, a spam filter and a language model are all agents in this sense. What they share is the loop below: take in information, use some model of the world and a goal to decide, then act.

How does intelligence show up in a machine?

A calculator follows a fixed procedure and gets exactly one kind of input. What makes a system feel intelligent is handling cases nobody wrote down in advance. A route planner has never seen your exact trip; a spam filter has never seen this exact email; a chatbot has never seen your exact question. Each has to generalise from a model or from past data.

Alan Turing saw in 1950 that arguing about whether machines “really” think goes nowhere, and proposed judging them by what they can do. Researchers still largely follow him. We ask whether a system reaches goals across a range of situations, how efficiently it learns, and how gracefully it fails when a situation is new.

One consequence is that AI is a moving target. Route planning, handwriting recognition and chess were all once headline AI; today they are just software. People sometimes call this the “AI effect”: once something works reliably, we stop calling it intelligent.

Why does it matter?

Because it is no longer niche. Stanford’s 2026 AI Index reports that generative AI reached 53% population-level adoption within three years, faster than the personal computer or the internet, and that 88% of organisations reported using AI in 2025. Decisions about hiring, lending, medicine and news are increasingly shaped by these systems.

You do not need to build models to benefit from understanding them. Knowing what kind of machine you are dealing with tells you what to trust it with, what questions to ask when someone makes a claim about it, and where it is likely to break.

Key takeaways

  • AI builds agents: systems that perceive, decide and act to reach goals in situations not scripted in advance.
  • The field judges intelligence by behaviour and generalisation, not by whether a machine "really" thinks.
  • AI is already embedded in everyday decisions, which is why understanding its mechanics matters for everyone.

Three ways to build intelligence

Strip away the product names and nearly every AI system is built from three ideas: search through possibilities, learn patterns from data, and reason with explicit knowledge. Knowing which one is doing the work tells you most of what to expect from a system.

What are they?

Search and planning treats a problem as a space of states connected by actions, and looks for a sequence of actions that reaches a goal. A satnav searching a road graph, a chess engine looking ahead twenty moves and a robot planning how to grasp a cup are all searching.

Learning from data starts with examples instead of instructions. Show the system thousands of emails labelled spam or not, and it adjusts internal parameters until its outputs match the labels, then applies that function to new emails. Almost every AI headline since 2012 is about learning.

Rules and knowledge writes down facts and logical rules explicitly and derives conclusions from them. Tax software, eligibility checkers and the medical expert systems of the 1980s work this way. It is precise and explainable, but only as complete as the person who wrote the rules.

How do they work together?

Take one everyday problem: getting you home at 5pm. Road closures announced by the council are knowledge, rules the system must obey. How long each road takes at rush hour is learned from millions of past trips. Choosing the fastest route among billions of possible ones is search. A modern navigation app does all three.

The most impressive systems are hybrids. AlphaGo used learned networks to tell a search algorithm which moves were worth exploring. Today’s reasoning models learn to search through chains of thought. And a language model that calls a calculator or a database is pairing a learned model with exact, rule-following tools.

SearchStrong when the rules of the world are known and the challenge is the sheer number of options. Weak when the world is uncertain or hard to model.LearningStrong when you have lots of examples but no precise description. Weak when data is scarce, biased or shifts after deployment.KnowledgeStrong when correctness and audit trails matter and the domain can be written down. Weak with messy perception and exceptions.

Why does it matter?

When someone says a product “uses AI”, the useful follow-up is “which kind?”. A rules engine will be consistent and explainable but brittle; a learned model will be flexible but can fail silently on unusual inputs; a search-based planner will be only as good as its model of the world. Knowing the family predicts the failure modes.

Go deeper on search with the Search and Optimisation lesson, then watch A* think in the pathfinding lab.The Machine Learning lesson shows learning from data with live regression and classification demos.

Key takeaways

  • Search explores possibilities, learning fits patterns in examples, and knowledge-based systems reason from explicit rules.
  • Real systems combine families: learned models guide search, and learned models call exact tools.
  • Asking which family is doing the work is the fastest way to predict how a system will fail.

Seventy years of AI

AI’s history is not a smooth climb. It is a series of bold promises, painful winters and unexpected comebacks, with the three families taking turns in the lead. The pattern explains a lot about today’s excitement and today’s scepticism.

What does the pattern show?

The founders in 1956 expected rapid progress, and early programs that proved theorems and played checkers seemed to confirm it. Then the problems got real. Search blew up combinatorially on anything bigger than a toy, and single-layer perceptrons could not learn simple functions. When funders noticed the gap between promise and delivery, money dried up: the first winter.

Expert systems brought AI back in the 1980s by narrowing the ambition: encode one specialist’s knowledge as rules. They made real money, then buckled under their own maintenance costs, and the second winter followed. What emerged was quieter and more statistical: probabilistic models and machine learning that improved with data rather than with more hand-written rules.

What changed in 2012?

Neural networks were not new. The perceptron dates from 1958 and backpropagation from 1986. What changed was that three ingredients arrived together: large labelled datasets such as ImageNet, graphics processors that could train large networks quickly, and a set of engineering tricks that made deep networks trainable. AlexNet’s cut in ImageNet top-5 error from 26.2% to 15.3% was a large enough jump that the field changed direction within a couple of years.

The same recipe, bigger models on more data with more compute, then carried through the Transformer, GPT-3 and ChatGPT. Since 2024 a second lever has been added: letting models spend more computation thinking at answer time, learned through reinforcement learning on problems whose answers can be checked.

Why does it matter?

History cuts both ways. It warns against confident timelines: “within a generation” was said in the 1960s. But it also warns against dismissal: neural networks were written off twice and are now the foundation of the field. The useful stance is to judge systems on measured capability, not on hype or on past disappointments.

Key takeaways

  • AI has had two major winters, each caused by a gap between promises and what methods could deliver.
  • Deep learning won after 2012 because data, compute and algorithms matured at the same time, not because of one new idea.
  • Since 2024, progress also comes from spending more computation at answer time, a learned echo of classic search.

Narrow, general and jagged

Deep Blue could beat the world chess champion and could not play noughts and crosses. A 2026 frontier model can earn olympiad gold in maths and still misread an analogue clock. Understanding why is the key to using AI well.

What is narrow AI?

Narrow AI is built for one task: recognise faces, filter spam, play Go. Nearly all deployed AI before 2020 was narrow. Its competence does not transfer. Point a chess engine at a different game and it has nothing to offer, because everything it knows is encoded in chess-specific search and evaluation.

What about general AI?

Large language models changed the picture. A single model trained to predict text can translate, summarise, write code, explain physics and plan a trip. These are general-purpose models: one system, many tasks, specified in plain language rather than by retraining.

That is not the same as artificial general intelligence (AGI), a term with no agreed definition. Some use it to mean matching humans at most cognitive tasks, some at most economically valuable work, some the ability to learn any new skill as efficiently as a person. Because the definitions differ, claims that AGI is near or far often talk past each other. It is more useful to ask about specific capabilities.

NarrowOne task, trained for it. Deep Blue, a face unlock model, a fraud detector. Often superhuman within its lane.General-purposeOne model, many tasks, steered by instructions. Today’s large language and multimodal models.AGIA contested goal: human-level ability across most tasks, including learning new ones. Not a product category.

How can a model be brilliant and clumsy at once?

Researchers describe AI’s abilities as a jagged frontier. In a field experiment with 758 Boston Consulting Group consultants, those given GPT-4 completed 12.2% more tasks, 25.1% faster and with over 40% higher quality on tasks inside the model’s abilities. On a task deliberately chosen to sit just outside them, consultants using AI were 19 percentage points less likely to reach the correct answer. The frontier was invisible: the task looked similar, and the AI sounded equally confident.

The 2026 AI Index puts it bluntly: frontier models meet or exceed human baselines on PhD-level science questions and competition maths, yet struggle to tell the time from a clock face, and household robots succeeded in only 12% of tasks in the benchmark it tracks. This echoes an old observation known as Moravec’s paradox: what is hard for people (abstract reasoning) can be easy for machines, and what is effortless for a toddler (perception and movement in a messy world) can be very hard.

Why does it matter?

A single impressive result tells you little about a neighbouring task. Before relying on a model, test it on your actual cases, including the awkward ones, and keep a human check where errors are costly. The jaggedness is also a moving target: each model generation pushes some parts of the frontier out and leaves others behind.

Key takeaways

  • Narrow AI does one task; general-purpose models do many tasks from instructions; AGI is a contested goal, not a product.
  • AI capability is jagged: superhuman on some tasks and unreliable on similar-looking ones, often with equal confidence.
  • Judge a model on your own tasks, especially the ones just outside what it is known to do well.

Rules versus learning

In the early 2000s, email was drowning in spam and the defence was hand-written rules. They kept losing. The fix that worked was to stop writing rules and let the computer learn them from examples. You can rerun that experiment below.

What is the difference?

A rule-based filter is a program a person writes: if the message contains “free” or “winner”, mark it as spam. A learned filter is a program that writes its own decision procedure from labelled examples. You supply messages marked spam or not spam; it works out how much each word counts as evidence.

Paul Graham’s 2002 essay made the case vividly. Looking for the single word “click” caught 79.7% of his spam with 1.2% false positives, but every further rule gained less and cost more. His statistical filter missed fewer than 5 in 1,000 spams with no false positives in his test.

How does the learned filter work?

The demo uses naive Bayes, one of the oldest and simplest learning algorithms. For every word it counts how often it appears in spam and in normal messages. At test time it asks: for each word in this message, how much more likely is it to appear in spam than in normal mail? It adds up that evidence, in log space so that many small factors become a sum.

log [P(spam | words) / P(ok | words)]
= log [P(spam) / P(ok)] + Σ log [P(word | spam) / P(word | ok)]

The log-odds of spam is the prior log-odds plus one term per word. 'Naive' refers to treating the words as independent given the class, which is false but works surprisingly well.

A worked example with the starting data. The spam examples contain 68 words in total, the normal ones 61, and there are 90 distinct words. “claim” appears 4 times in spam and never in normal mail. With add-one smoothing, so that no word ever gets probability zero:

P(claim | spam) = (4 + 1) / (68 + 90) ≈ 0.0316
P(claim | ok) = (0 + 1) / (61 + 90) ≈ 0.0066
log [(5/158) / (1/151)] ≈ +1.56

So seeing “claim” multiplies the odds of spam by about 4.8. The word “free”, by contrast, appears once in each class and carries almost no evidence (−0.05), which is exactly the nuance a keyword rule cannot express.

With the starting data the rules score 4 out of 8 and the learned model 7 out of 8. The rules miss spam that avoids their keywords and flag an innocent dinner invitation because it says “free”. The learned model misclassifies the same invitation. “Tonight”, “want”, “grab” and “dinner” are unknown to it, “free” is neutral, and the harmless word “to” happens to appear only in the spam examples, so the model has learned a coincidence as if it were a clue. Adding one normal message such as “Free tonight? Fancy a film?” flips it. That is the essence of machine learning: you fix behaviour by fixing data, not code.

Why does it matter?

Rules are still the right tool when the knowledge is exact and must be auditable: drug interaction lists, tax brackets, safety interlocks. But for fuzzy, high-dimensional problems such as language, images and fraud, nobody can write the rules down, and learned models win. The trade is that a learned model is only as good as its data. It knows nothing about words it has never seen, and it will faithfully learn any mistake or bias in its labels.

See how text becomes numbers, from bag-of-words to embeddings, in the Natural Language Processing lesson.

Key takeaways

  • Rules encode what a person already knows; learning extracts the rules from labelled examples.
  • Naive Bayes adds up per-word evidence estimated from counts, so weak clues can combine into a confident decision.
  • Learned systems are fixed by changing data, and they inherit every gap and bias in that data.

How modern AI is built

When you type a question into a chatbot, you are not talking to “a model” so much as to a system: a trained network wrapped in instructions, tools, retrieval and filters, built through a pipeline that takes months and costs from millions to billions of dollars.

What goes into the model?

Pretraining. A Transformer network, with billions of adjustable weights, reads a huge body of text (and increasingly images, audio and video) and learns to predict the next token. That single objective forces it to absorb grammar, facts, styles of argument and patterns of code. GPT-3 showed in 2020 that at 175 billion parameters such a model could perform new tasks from a few examples in its prompt.

Post-training. A base model continues text; it does not reliably follow instructions. Fine-tuning on examples of good answers, then optimising against human preferences, turns it into an assistant. In OpenAI’s InstructGPT work, people preferred answers from a 1.3 billion parameter model tuned this way over those from the 175 billion parameter GPT-3. Since 2024, a further stage trains reasoning by rewarding correct final answers on maths, science and coding problems, which teaches models to plan, check and backtrack in a long chain of thought before answering.

How does the system around the model work?

Suppose you ask: “What’s the weather in Lisbon tomorrow, and should I pack an umbrella?” The model cannot know tomorrow’s forecast from its training data. Instead, the application gives it a tool: a weather API it can call. The model emits a structured request, the application runs it, the result is pasted back into the context, and the model writes the answer. For questions about private documents, a retrieval step first finds relevant passages and adds them to the prompt. Chain enough of these steps together, with the model deciding what to do next, and you have an agent.

Not every component needs to be a chatbot. Many automated pipelines need a fast, reliable yes, no or score rather than a paragraph. In September 2026 TypeSafe released Jev, a “decision model” that returns typed answers from a fixed set of options with calibrated probabilities instead of free text. It is a sign of a wider trend: systems assembled from specialised parts, each chosen for its job.

Why does it matter?

Most of what you experience as “the AI” is engineering around the model. Whether an assistant cites sources, refuses unsafe requests, uses up to date information or takes actions depends on the system design as much as on the network. When a product fails, the fault may be in the data, the training, the retrieval, the tools or the guardrails, and each has a different fix.

Large Language Models: tokens, pretraining, post-training and reasoning, in depth.Embeddings and RAG: how retrieval grounds a model in your own documents.AI Agents: the loop of thinking, calling tools and observing results.Decision Models: when software needs a calibrated answer rather than a paragraph.

Key takeaways

  • Pretraining on next-token prediction gives broad knowledge; post-training makes the model helpful; reinforcement learning on checkable problems adds reasoning.
  • Deployed assistants are systems: model plus instructions, retrieval, tools and safety filters, sometimes looping as agents.
  • Specialised components, such as decision models that return typed answers, increasingly sit alongside chat models.

Honest limits

Using AI well means knowing where it breaks. None of these limits are reasons to ignore AI, and none are solved. They are the questions to keep asking of any system you depend on.

What goes wrong?

Fluent is not the same as true

A language model generates plausible text. Usually plausible and true coincide; sometimes they do not, and the model states an invented fact, quote or citation in exactly the same confident tone. ELIZA showed in 1966 that people read understanding into fluent text; the lesson is more pressing now that the text is far more fluent.

The frontier is jagged and shifts

Performance can collapse on inputs that differ from the training data: a new hospital’s scanners, a new slang term, a new kind of fraud. Because a model’s confidence often does not drop with its accuracy, these failures can be silent.

Models learn what the data says, including its biases

If historical decisions were unfair, a model trained to imitate them will be too, often in ways that are hard to see from the outside. Measuring and mitigating this is its own discipline.

Opacity, cost and energy

The 2026 AI Index reports that average scores on the Foundation Model Transparency Index fell from 58 to 40, with the most capable models disclosing the least, and estimates training emissions for a single frontier model, Grok 4, at 72,816 tonnes of CO2 equivalent. Knowing how a model was trained, and at what cost, is getting harder, not easier.

How is society responding?

Regulation is arriving unevenly. In the EU, the AI Act’s transparency duties, such as telling people when they are talking to an AI and labelling generated content, apply from August 2026, while obligations for high-risk uses such as hiring or credit scoring were pushed back to December 2027 in a deal agreed in May 2026. Elsewhere, rules are mostly sectoral or voluntary.

Why does it matter?

These limits decide where AI can be deployed safely. Where errors are cheap and easy to spot, such as drafting or brainstorming, today’s systems are already transformative. Where errors are costly and hard to detect, such as medicine, law and finance, they need evaluation, oversight and often a human in the loop.

AI Ethics and Safety: measure bias and fairness trade-offs on real numbers.Evaluating Models: why accuracy lies, and how to test whether a model really works.

Key takeaways

  • Fluency is not accuracy: models can state invented facts with the same confidence as true ones.
  • Failures often come from inputs unlike the training data, from biased data, or from opaque training, and can be silent.
  • Match the level of oversight to the cost of an error and how easy it is to spot.

Check your understanding

Seven scenarios. Each asks you to apply an idea from this lesson to a situation you might actually meet.

Question 1 of 7

A hospital pharmacy wants software that warns when two prescribed drugs are on a published list of 500 dangerous interactions. Every warning must be traceable to a source for auditors. Which approach fits best?

Ready for more? The natural next step is Machine Learning, where you will fit models to data with your own hands. If you prefer search, start with the A* pathfinding lab.

References

Primary sources for every factual claim in this lesson, from Turing’s 1950 paper to 2026 reports.

References

  1. [1]

    Artificial Intelligence: A Modern Approach (4th edition)(opens in a new tab)

    Stuart Russell & Peter Norvig, 2020

    The standard AI textbook. Frames AI as the study of agents that perceive their environment and act to achieve the best expected outcome.

  2. [2]

    Computing Machinery and Intelligence(opens in a new tab)

    Alan M. Turing, 1950

    Mind 59(236). Replaces "Can machines think?" with the imitation game, and anticipates learning machines.

  3. [3]

    The 2026 AI Index Report(opens in a new tab)

    Stanford Institute for Human-Centered AI, 2026

    Annual data report. Frontier models match or beat human baselines on PhD-level science and competition maths yet still struggle with tasks such as reading clocks.

  4. [4]

    ImageNet Classification with Deep Convolutional Neural Networks(opens in a new tab)

    Alex Krizhevsky, Ilya Sutskever & Geoffrey Hinton, 2012

    NeurIPS 2012. A GPU-trained CNN won ILSVRC-2012 with 15.3% top-5 error against 26.2% for the runner-up.

  5. [5]

    Learning to Reason with LLMs(opens in a new tab)

    OpenAI, 2024

    The o1 announcement (September 2024): performance rises with both reinforcement-learning compute and time spent thinking at test time.

  6. [6]

    Navigating the Jagged Technological Frontier: Field Experimental Evidence of the Effects of AI on Knowledge Worker Productivity and Quality(opens in a new tab)

    Fabrizio Dell’Acqua, Edward McFowland III, Ethan Mollick et al., 2023

    Harvard Business School working paper 24-013. Consultants using GPT-4 did better on tasks inside the model’s abilities and worse on one just outside them.

  7. [7]

    A Plan for Spam(opens in a new tab)

    Paul Graham, 2002

    The essay that popularised Bayesian spam filtering after hand-written rules kept failing.

  8. [8]

    Language Models are Few-Shot Learners(opens in a new tab)

    Tom Brown, Benjamin Mann, Nick Ryder et al., 2020

    GPT-3, a 175-billion-parameter language model that could perform new tasks from a few examples in its prompt.

  9. [9]

    Training language models to follow instructions with human feedback(opens in a new tab)

    Long Ouyang, Jeff Wu, Xu Jiang et al., 2022

    InstructGPT. Outputs of a 1.3B model tuned with human feedback were preferred over those of the 175B GPT-3.

  10. [10]

    DeepSeek-R1: Incentivizing Reasoning Capability in LLMs via Reinforcement Learning(opens in a new tab)

    DeepSeek-AI, 2025

    An openly released reasoning model trained largely with reinforcement learning on verifiable rewards.

  11. [11]

    Introducing System One Models & Jev(opens in a new tab)

    Diogo Almeida, TypeSafe AI, 2026

    A model that returns typed decisions with calibrated probabilities instead of free text.

  12. [12]

    Artificial Intelligence: Council and Parliament agree to simplify and streamline rules(opens in a new tab)

    Council of the European Union, 2026

    May 2026 agreement deferring AI Act high-risk obligations to December 2027 while transparency duties keep their August 2026 date.

  13. [13]

    A Proposal for the Dartmouth Summer Research Project on Artificial Intelligence(opens in a new tab)

    John McCarthy, Marvin Minsky, Nathaniel Rochester & Claude Shannon, 1955

    The funding proposal that coined the term "artificial intelligence" for a 1956 summer workshop at Dartmouth College.

  14. [14]

    The perceptron: a probabilistic model for information storage and organization in the brain(opens in a new tab)

    Frank Rosenblatt, 1958

    Psychological Review 65(6). The first trainable artificial neuron with a learning rule.

  15. [15]

    ELIZA: a computer program for the study of natural language communication between man and machine(opens in a new tab)

    Joseph Weizenbaum, 1966

    Communications of the ACM 9(1). A pattern-matching chatbot whose users attributed understanding to it.

  16. [16]

    Artificial Intelligence: A General Survey (the Lighthill Report)(opens in a new tab)

    James Lighthill, 1973

    Report to the UK Science Research Council criticising the "combinatorial explosion" in AI; it led to deep funding cuts in Britain.

  17. [17]

    R1: a rule-based configurer of computer systems(opens in a new tab)

    John McDermott, 1982

    Artificial Intelligence 19(1). The expert system (later XCON) that configured DEC VAX orders and became the showcase of the expert-system boom.

  18. [18]

    Learning representations by back-propagating errors(opens in a new tab)

    David Rumelhart, Geoffrey Hinton & Ronald Williams, 1986

    Nature 323. Showed that backpropagation lets multi-layer networks learn useful internal representations.

  19. [19]

    Deep Blue(opens in a new tab)

    Murray Campbell, A. Joseph Hoane Jr. & Feng-hsiung Hsu, 2002

    Artificial Intelligence 134. How the IBM system that beat Garry Kasparov in 1997 searched chess positions with custom hardware.

  20. [20]

    Mastering the game of Go with deep neural networks and tree search(opens in a new tab)

    David Silver, Aja Huang, Chris Maddison et al., 2016

    Nature 529. Combined learned policy and value networks with Monte Carlo tree search.

  21. [21]

    Attention Is All You Need(opens in a new tab)

    Ashish Vaswani, Noam Shazeer, Niki Parmar et al., 2017

    NeurIPS 2017. Introduced the Transformer, the architecture behind today’s language models.

  22. [22]

    Introducing ChatGPT(opens in a new tab)

    OpenAI, 2022

    Announcement of the conversational model released on 30 November 2022.

  23. [23]

    Advanced version of Gemini with Deep Think officially achieves gold-medal standard at the International Mathematical Olympiad(opens in a new tab)

    Google DeepMind, 2025

    Solved five of six IMO 2025 problems in natural language for 35/42 points, certified by IMO coordinators.

Related