Skip to main content
All levels

Level 1: AI Foundations — Cheat Sheet

Key takeaways and terms from all 12 lessons. Print it, pin it, revise from it.

AI-001What is Artificial Intelligence?

  • AI = systems performing tasks that normally require human intelligence.
  • The defining shift: learning patterns from data instead of following hand-written rules.
  • AI ⊃ Machine Learning ⊃ Deep Learning: nested subsets, not synonyms.
  • You already use dozens of AI systems daily; it is infrastructure, not science fiction.
  • AI predicts from patterns; it does not understand, and it is not always right.

AI-002What is Machine Learning?

  • ML = learning patterns from examples; the data writes the rules, not the programmer.
  • The loop: labelled data → training → prediction → feedback → better model.
  • Three types: supervised (labelled answers), unsupervised (hidden structure), reinforcement (rewards).
  • Data quality beats algorithm cleverness: garbage in, garbage out.
  • Models generalize patterns; they fail where their training data has gaps.

AI-003Deep Learning

  • Deep = many layers; each layer learns more abstract patterns than the one below.
  • The breakthrough: features are learned from raw data, not hand-crafted by experts.
  • Data + GPUs + technique advances made it practical after 2012; ImageNet was the turning point.
  • It powers all modern vision, speech, and language AI, including every chatbot.
  • It is data- and compute-hungry, hard to interpret, and overkill for small structured problems.

AI-004Neural Networks

  • A neuron = multiply by weights, add, squash. Nothing more.
  • Networks = neurons in layers; outputs of one layer feed the next.
  • Weights and biases (= parameters) are where all learned knowledge lives.
  • "175B parameters" means 175 billion learned numbers: capacity, not wisdom.
  • The same arithmetic scales from your umbrella example to frontier LLMs.

AI-005Training

  • Training = predict → measure loss → compute gradients → nudge weights → repeat, millions of times.
  • Gradient descent is a downhill walk through a foggy loss landscape; learning rate is stride length.
  • Overfitting = memorizing the training set; held-out validation/test data is the detector.
  • The loss curve is the heartbeat of every training run.
  • Training is astronomically expensive; using the result is cheap. That gap is the economics behind the whole AI industry.

AI-006Data

  • The model IS its data: capabilities, blind spots, and biases all inherit from the training set.
  • Labelled data is the expensive kind; whole industries exist to produce it.
  • Good datasets need quantity, quality, diversity, and freshness; diversity failures cause the ugliest surprises.
  • Models learn hidden patterns too (spurious correlations); the X-ray scanner story is the eternal warning.
  • Data work is 80% of applied ML, and it is where debugging almost always leads.

AI-007Models

  • A model is a file: architecture + learned weights. Copying the file copies the capability.
  • Frozen after training: it does not learn from use or update itself.
  • Families map to tasks: classifiers, regressors, vision, speech, embeddings, LLMs, generative.
  • Model cards are spec sheets: parameters, context, cutoff, license, evals.
  • Versions change behavior, so pin them and re-evaluate before upgrading.

AI-008Inference

  • Inference = read-only forward pass through frozen weights; training writes, inference reads.
  • It is the phase users experience and businesses pay for, request by request.
  • Latency, throughput, and cost per request are the three ruling metrics, and they trade off.
  • Inference runs everywhere from cloud GPUs to your phone; compression moves it down the stack.
  • LLM streaming, token pricing, and GPU bills are all inference phenomena.

AI-009Large Language Models

  • An LLM does one thing: predict the next token. Everything else emerges from doing it at scale.
  • Replies are generated one token per forward pass, which is why streaming, sampling variety, and output pricing all work the way they do.
  • Prediction pressure compressed a world-model into the weights, though imperfectly: hallucination and cutoffs are design consequences, not bugs.
  • Scaling laws made capability predictable; assistants are base models shaped by fine-tuning.
  • Every major chatbot is this same architecture with different data, scale, and polish.

AI-010Prompt Engineering

  • Prompting = conditioning the continuation; every word steers the distribution.
  • Six levers: specificity, role, examples, step-by-step, context, and guarded escape routes.
  • Production prompts have a skeleton (role, context, task, format, guards) and are versioned like code.
  • Debug outputs by diagnosing the brief, not cursing the model.
  • Prompting is the cheapest fix in AI, and the first one to try before heavier machinery.

AI-062AI Bias & Fairness

  • Bias enters through data (historical, representation, measurement, aggregation, and deployment paths) more than through model architecture.
  • The famous failures share one root: nobody disaggregated the metrics until after harm occurred.
  • Fairness has multiple valid definitions that mathematically conflict; choosing one is a product decision.
  • The practical toolkit is measurement: per-group evals, proxy hunts, representation audits, and post-launch monitoring.
  • Regulation increasingly makes this checklist mandatory, not optional.

AI-078Classical Machine Learning

  • Linear and logistic regression remain the simplest, most interpretable baselines for numeric and categorical prediction, and are still deployed widely in regulated industries.
  • Decision trees are easy to understand but prone to overfitting; random forests and gradient boosting (XGBoost, LightGBM, CatBoost) fix this by combining many trees.
  • K-means clustering is the classical unsupervised technique for grouping unlabeled data, distinct from the supervised methods above.
  • Classical ML wins over deep learning (AI-003) on small tabular datasets, when interpretability is required, and when latency or compute budgets are tight.
  • Credit scoring, fraud detection, and most Kaggle tabular-data competitions are real-world proof that classical ML is not a historical footnote, it is still the right default tool for structured data.

Key terms

Artificial Intelligence (AI)
The field of computer science focused on building systems that perform tasks normally requiring human intelligence, such as recognizing images, understanding speech, or generating text. In this lesson the defining feature is that modern AI learns patterns from data rather than following hand-written rules.
Machine Learning (ML)
The subset of AI where systems learn from examples instead of being explicitly programmed, the technology behind nearly all modern AI. When a headline says "the AI decided," it almost always means a machine-learned model made a statistical prediction. (see AI-002)
Deep Learning
The subset of Machine Learning that uses many-layered neural networks, powering image recognition, speech, and chatbots like ChatGPT and Claude. It sits at the innermost level of the AI ⊃ ML ⊃ Deep Learning nesting. (see AI-003)
Traditional Programming
The classic approach where a programmer writes explicit rules, such as "IF email contains 'FREE $$$' THEN spam." It fails predictably when a rule is missing, whereas a learned system generalizes from patterns, the central contrast of this lesson.
Model
The learned artifact produced by training on examples: the "internal sense of cat-ness" in the child analogy. Given a new input it has never seen, a model produces a prediction based on the statistical patterns it absorbed.
Training
The process of showing a system many labelled examples (a million cat photos) so it discovers the distinguishing patterns itself. Nobody writes the rules; the data effectively writes them. (see AI-005)
Inference
Using an already-trained model to make a prediction on new input, like your face unlock comparing your face to stored patterns. Training happens once on many examples; inference happens every time you use the system.
Generalization
A model's ability to handle cases it never saw during training, the way a child recognizes a brand-new cat. This is why a learned spam filter keeps working when spammers invent new tricks while a rule-based one breaks.
Machine Learning
The branch of AI where computers learn patterns from examples and improve through experience, instead of relying on manually programmed rules. In the spam-filter example, the programmer writes only the learning procedure; the data writes the rules.
Training
The step where an algorithm processes labelled examples and adjusts millions of internal numbers (parameters) to capture distinguishing patterns. For a spam filter, that means learning which words, sender patterns, and link densities separate spam from legitimate mail. (see AI-005)
Label
The known correct answer attached to a training example, such as an email tagged "spam" or "not spam" by a human. Labels are what make supervised learning possible, and user corrections like clicking "Not spam" become fresh labels.
Supervised Learning
Learning from labelled examples where each input has a known correct answer, answering questions like "Is this email spam?" or "What will this house sell for?" It dominates industry because labelled data plus a clear question is the most common business situation.
Unsupervised Learning
Learning from unlabelled data to find hidden structure, answering questions like "Which customers behave similarly?" Everyday uses include customer segmentation and anomaly detection.
Reinforcement Learning
Learning through trial, error, and rewards rather than labelled answers. It is the approach behind game AI, robotics, and tuning chatbots with human feedback. (see AI-067)
Overfitting
When a model memorizes its training examples instead of learning the underlying pattern, so it recalls old cases perfectly but fails on new ones. The house-price model priced a farmhouse absurdly because its city-apartment training data left a gap. (see AI-005)
Data Bias
Systematic gaps or skews in training data that the model faithfully learns and reproduces, like the child shown only red apples failing on green ones. More biased data does not help; it entrenches the bias. (see AI-062)
Deep Learning
Machine Learning built on neural networks with many stacked layers (from a dozen to hundreds), where each layer learns progressively more abstract patterns. It is the technology behind every headline AI capability of the last decade, from face unlock to ChatGPT.
Neural Network
A computational structure made of layers of simple connected units, loosely inspired by the brain. No single layer understands the input; recognition emerges from the whole stack working together. (see AI-004)
Layer
One stage of a deep network's processing hierarchy: early layers detect edges, middle layers combine them into parts like eyes and noses, and deep layers assemble whole concepts. The lesson's company analogy maps layers to frontline staff, team leads, and directors.
Feature
A measurable property the model uses to make predictions. Before deep learning, experts hand-crafted features for years ("count the edges"); deep learning's real breakthrough is that features are learned automatically from raw pixels, audio, or text.
Feature Engineering
The old craft of manually designing input features for each domain, which required specialist effort and plateaued in accuracy. ImageNet 2012 (AlexNet) showed learned features beating hand-engineered ones by a margin that redirected the entire field.
GPU
Graphics Processing Unit, hardware originally built for games that turned out to be perfect for the parallel math of stacked layers. GPUs are one of the three fuels (with data and training techniques) that made deep learning practical after 2012.
ImageNet
The large labelled-image benchmark whose 2012 competition was deep learning's turning point, when AlexNet beat the best hand-engineered systems decisively. It is the standard historical marker for when the field pivoted to deep learning.
Gradient-Boosted Trees
A classical ML method that usually beats deep learning on small tabular datasets, such as a 2,000-row spreadsheet. A reminder that deep learning is the wrong tool when data is small, budgets are tight, or explanations are required.
Neuron
A single unit that does three things: multiply each input by a weight, add the results plus a bias, and squash the total through a simple function before passing it on. The umbrella example shows the full arithmetic; there is nothing else hidden inside.
Weight
A learned number acting as a neuron's importance dial for one input, like 0.8 for cloud cover in the rain detector. In the orchestra analogy the weights are the sheet music; the intelligence lives in their values, not in the neurons.
Bias
A baseline offset added to a neuron's weighted sum before squashing, such as the −0.5 in the umbrella example. It shifts the threshold at which the neuron activates.
Activation Function
The "squash" step that transforms a neuron's summed input before passing it on, e.g. "if negative, output 0." It is what lets stacked layers build patterns more complex than plain addition and multiplication.
Layer
A group of neurons whose outputs feed the next group: input layer (raw numbers), hidden layers (pattern-building middle), output layer (the answer). Layer stacking is what makes networks deep. (see AI-003)
Parameters
All the weights and biases in a network. It's the number in every model card, from ~100 thousand in a tiny classifier to hundreds of billions in frontier LLMs. More parameters means more pattern-storage capacity, and more data and compute to train and run. (see AI-064)
Hidden Layer
Any layer between input and output where intermediate patterns are built: edges into parts into objects. The name just means its values are not directly observed as input or output.
Confabulation
Producing plausible but wrong output because knowledge is dissolved into weight arithmetic rather than filed in a lookup table. This is why a network cannot cite where a fact came from. (see AI-060)
Training
The loop of showing a model examples, measuring how wrong its predictions are, and nudging millions of weights slightly in the improving direction, repeated millions of times. Like basketball free throws, the feedback loop carves skill into the weights one small correction at a time.
Loss
The "wrongness score" a loss function assigns to each prediction: the model guesses "dog, 62%" for a cat and gets a loss of 2.4. Watching the loss curve fall is how practitioners literally see a model learning.
Gradient Descent
The core optimization strategy: like walking down a foggy hillside, feel the slope (gradient) under your feet and step downhill, repeatedly. The landscape is the loss across all possible weight settings, and each step is one weight update.
Learning Rate
The stride length of gradient descent. It sets how big each weight-update step is. Too small and training takes forever; too large and updates overshoot the valley and bounce between hillsides.
Epoch
One complete pass through the entire training dataset. Training typically runs many epochs until the loss stops shrinking.
Overfitting
Memorizing training examples instead of learning the general pattern: perfect training accuracy, terrible real-world accuracy, like a student who memorized past exam papers. The telltale signal is training accuracy rising while validation accuracy falls.
Validation Set
The ~10% data slice held out from weight updates and checked during training to tune decisions and detect overfitting. Distinct from the test set, which is touched exactly once at the end as the final honest exam.
Test Set
The held-out ~10% used once, at the very end, to measure honest real-world performance. If it leaks into training decisions, the exam is void: the student saw the questions.
Structured Data
Information organized as tables of rows and columns, like sales records or sensor logs. It is the easiest kind to feed classical ML models.
Unstructured Data
Free-form content with no fixed format, such as photos, emails, audio, and PDFs. Deep learning's ability to learn directly from raw unstructured data is what made it dominant. (see AI-003)
Labelled Data
Examples with the correct answer attached, like an email tagged "spam." Labels usually come from paid human effort, which makes labelled data the expensive kind; LLMs escaped this economics by using the next word as a free label. (see AI-009)
Spurious Correlation
A pattern in the data that predicts the label for the wrong reason, like "portable scanner style = pneumonia" in the hospital X-ray story or snow backgrounds in wolf photos. The model learns whatever patterns are present, including the ones you didn't know were there.
Data Diversity
Coverage of the situations the model will actually face: daytime and nighttime driving photos, every friend indoors and outdoors. Diversity gaps are exactly where the model fails, and they cause the ugliest deployment surprises.
Data Freshness
How current the dataset is relative to the drifting real world; a fraud model trained on 2019 patterns misses 2026 scams. Data has a shelf life, and deployed models degrade silently as the world moves. (see AI-028)
Synthetic Data
Training data generated by models for other models, now standard practice at the frontier. It sits alongside human annotation, user exhaust, and programmatic labels as a source of training examples. (see AI-067)
Data Bias
Systematic skew in a dataset that the model inherits as its own bias; more of the same biased data entrenches the problem rather than fixing it. (see AI-062)
Model
A file containing an architecture recipe plus billions of learned weights. Copy the file and you copy the capability. A 7B-parameter model at 2 bytes per weight is a ~14 GB file holding everything it learned, no database or internet required.
Model Card
The spec sheet shipped with a model release: parameters, context window, training cutoff, modalities, license, and benchmark evals. Learning to parse "Llama 3.1 8B, 128K context, cutoff Dec 2023, open weights" is the practical skill this lesson teaches.
Parameters
The count of learned numbers in the model (7B, 70B, 671B), a proxy for capacity, memory footprint, and cost. On mixture-of-experts models, watch for total versus active parameters. (see AI-064)
Context Window
The model's working-memory size, from 8K to 1M tokens, meaning how much text it can consider at once. It is a model-card field, not a learning mechanism. (see AI-061)
Training Cutoff
The date at which the model's knowledge of the world ends, because the weights are frozen after training. Anything that happened later is simply not in the file.
Model Version
A specific release of a model (GPT-4 → GPT-4o, Claude 3 → 3.5 → 4) whose behavior can differ dramatically from its siblings. Production teams pin exact versions and run regression evals before upgrading. (see AI-026)
Classifier
A model family mapping an item to a category, such as spam filters or defect detection. One of several families (regressors, vision, speech, embeddings, LLMs, generative) that real products often chain into pipelines. (see AI-021)
Open Weights
Releasing the model file itself so anyone can download and run it. Sharing the file shares the capability. The DeepSeek-R1 release showed a single uploaded file can move markets. (see AI-066)
Inference
Using a trained model to make predictions on new inputs: the read-only phase where weights are only read, never written. Training happens once in a lab; inference happens billions of times a day in your pocket.
Forward Pass
One trip of input numbers through the network's layers (multiply by weights, add, squash) with no weight changes. For an LLM, each forward pass produces the next token's probabilities, which is why long responses stream word by word.
Latency
How long one request takes; users feel anything over ~200ms in interactive apps, while LLM chat lives at 1–10 seconds. Reduced with smaller models, quantization, caching, and streaming. (see AI-065)
Throughput
Requests served per second per machine, multiplied by batching many requests through the GPU together. It trades directly against latency: bigger batches serve more users but each waits longer.
Cost per Request
The GPU-seconds burned per prediction, the third ruling metric of serving. At a million requests a day, shaving 30% off inference cost is real money. (see AI-059)
Batching
Running many requests through the GPU simultaneously to raise throughput, at the price of added per-request latency. Serving engineering is choosing your point on the latency/throughput/cost triangle.
On-Device Inference
Running the model on the user's hardware (face unlock, keyboard prediction) for zero network dependency, total privacy, and offline operation. Compression techniques like distillation and quantization make models fit. (see AI-065)
Serving
The production engineering discipline of running inference at scale, including preprocessing, safety filters, retries, and scheduling engines like vLLM that can triple throughput on the same hardware. (see AI-021)
Large Language Model (LLM)
A neural network with billions of parameters trained on trillions of words to do one thing: predict the next token. That single skill, at sufficient scale, produces translation, coding, reasoning, and conversation.
Token
The unit of text an LLM reads and writes, roughly a word or word-fragment. Each reply is generated one token per forward pass, which explains streaming, output pricing, and letter-counting blind spots. (see AI-059)
Next-Token Prediction
The sole training objective of an LLM: given text so far, output a probability for every possible next token. To predict really well, the model is forced to compress the world that produced the text, including its grammar, facts, styles, and reasoning patterns.
Temperature
The randomness dial applied when sampling the next token from the probability distribution. It is why the same creative question yields different answers each time, while "What is 2+2?" stays identical, since one token dominates.
Scaling Laws
The research finding that capability rises smoothly and predictably as parameters, data, and compute grow together. Skills nobody programmed, such as translation, arithmetic, and coding, simply emerged as models grew.
Hallucination
Fluent, confident fabrication that follows from the design: the model always produces a plausible next token, even where it has no knowledge, because plausibility is its only currency. (see AI-060)
Knowledge Cutoff
The date the model's training data ends; it knows nothing after that. A design consequence of frozen weights, not a bug. (see AI-007)
Transformer
The architecture underlying every major LLM family, including GPT, Claude, Gemini, and Llama. They differ in data mix, scale, fine-tuning, and openness, not in the core design. (see AI-012)
Prompt
The input text the model continues. Every word shifts the probability distribution over possible outputs. You are not commanding a machine; you are conditioning a distribution. (see AI-009)
Prompt Engineering
The craft of writing inputs that steer a model toward the output you want. It is the highest-leverage, lowest-cost skill in applied AI, and the first tool to try before fine-tuning or complex pipelines. (see AI-051)
Few-Shot Prompting
Showing one or two input→output example pairs in the prompt so the model pattern-matches your format and style. It teaches better than paragraphs of description.
Chain-of-Thought
Asking the model to "think step by step" before answering, which measurably improves math and logic. The intermediate tokens act as working memory. (see AI-063)
Role Prompting
Assigning a persona ("You are a senior security engineer reviewing code for OWASP top-10 vulnerabilities") to activate the right register and knowledge for the task.
System Prompt
The layered production prompt (role, context, task, format, guardrails) behind virtually every LLM product, often thousands of words long and versioned like source code. (see AI-057)
Guardrail
An explicit escape route like "If the information is not in the document, say 'not found' — do not guess." Permission not to answer beats silent fabrication. (see AI-060)
Grounding
Pasting the actual document, data, or code into the prompt so the model works from real context instead of guessing. This is a direct hallucination reducer. When knowledge is missing entirely, retrieval or fine-tuning is needed instead. (see AI-016)
RICE Prompt
A structured prompt-writing framework covering Role, Instruction, Context, and Expectation, giving beginners a checklist so no critical piece of a prompt gets left out. It is a scaffold for the same system-prompt discipline covered above, not a replacement for it. (see AI-057)
AI bias
Systematic differences in a model's behavior or performance across groups, inherited primarily from training data and design choices rather than intentional programming.
Historical bias
Unfairness present in the world that generated the training data. The data records past discrimination faithfully and the model learns it as ground truth.
Representation bias
Skew caused by some groups being underrepresented in training data, producing models that perform worse for the groups they saw least.
Measurement bias
Distortion introduced when the training label is a flawed proxy for the real outcome, like using arrests as a proxy for crime or spending as a proxy for medical need.
Proxy variable
An innocent-looking feature (postcode, school, vocabulary) that statistically encodes a sensitive attribute, letting bias survive the removal of explicit columns.
Demographic parity
A fairness definition requiring each group to receive positive outcomes at the same rate.
Equal opportunity
A fairness definition requiring that, among people who truly qualify, each group is approved at the same rate.
Disaggregated evaluation
Reporting model metrics separately per group instead of only in aggregate. It is the single most important bias-detection practice.
Model card
A standardized document reporting a model's intended use, training data, and per-group performance so deployers can assess fairness before use.
Bias audit
A structured (increasingly legally required) assessment measuring an AI system's performance differences across demographic groups.
Linear Regression
A model that predicts a continuous number as a weighted sum of input features plus a bias term, the simplest baseline predictor. (see AI-002)
Logistic Regression
A classification model that outputs a probability by passing a weighted sum of features through a sigmoid function, widely used for interpretable yes/no predictions.
Decision Tree
A model that predicts by branching through a sequence of yes/no questions about input features, ending at a leaf node prediction.
Random Forest
An ensemble of many decision trees, each trained on a random subset of data and features, whose predictions are averaged to reduce overfitting.
Gradient Boosting
An ensemble method that builds decision trees sequentially, each new tree correcting the errors of the previous trees, to minimize overall prediction error.
XGBoost
A widely used gradient boosting implementation, prized for speed and accuracy on tabular data and a frequent winner of Kaggle competitions.
K-Means Clustering
An unsupervised algorithm that groups unlabeled data into k clusters by iteratively assigning points to the nearest cluster center and recomputing centers.
Unsupervised Learning
Learning from unlabeled data to find hidden structure, such as clusters, with no correct-answer labels provided. (see AI-002)
Tabular Data
Structured data organized in rows and columns (e.g., spreadsheets, database tables), the data type classical ML handles best.
Feature Importance
A score, produced by tree-based ensemble models, indicating which input features contributed most to a model's predictions.
Interpretability
The degree to which a model's decision process can be understood and explained, a key advantage of classical ML over deep learning in regulated domains. (see AI-003)

AI Learning Hub — Level 1 cheat sheet. Content created with AI assistance and reviewed by the author.