theNotebook

Concepts

Every idea, told three ways.

Start with a topic or pick a shelf. 30 concepts, each written for a ten-year-old, an architect and a CEO.

Shelf one

How a machine learns

  • Machine Learning Fit a function to data: supervised when the labels exist, unsupervised when you are hunting for structure without them, self-supervised when the data…

  • Neural Networks Layers of weighted sums pushed through non-linearities.

  • Gradient Descent Differentiate the loss with respect to every parameter, then step against the gradient.

  • Loss & Error MSE for regression, cross-entropy for classification, and a long tail of task-specific objectives, but the design decision that matters is that the…

  • Features & Encoding One-hot, ordinal, target and hashing encoders.

  • Evaluation & Metrics Hold-out sets and cross-validation for honesty.

Shelf two

The toolkit

  • Python Slow in the loop, unbeatable as the glue.

  • NumPy & pandas Vectorised arrays and dataframes: the discipline is thinking in whole-array operations instead of row loops, knowing where copies happen versus…

  • scikit-learn One consistent interface – fit, predict, transform – over most of classical ML, plus pipelines that keep preprocessing honest between training and…

  • PyTorch & TensorFlow Tensors, autograd and the training loop: define the forward pass, and the framework records the computation graph and differentiates it for you.

  • Notebooks & Tracking Jupyter for exploration, MLflow or Weights & Biases for runs, parameters, metrics and artefacts.

  • Data Pipelines Batch and streaming, orchestrators and retries, schema drift, late-arriving data, backfills that rewrite history, and idempotency so a rerun does not…

Shelf three

Language models & generative AI

  • Large Language Models Transformers and attention, pretrained on next-token prediction at a scale that turns a party trick into reasoning-shaped behaviour, then aligned…

  • Tokens & Embeddings Subword tokenisation sets your context budget and your bill – token counts, not word counts, are the unit of everything.

  • Prompting & Context Instructions, examples, retrieved documents, tool results and conversation history all compete for one finite context window, and the model attends…

  • Retrieval (RAG) Chunk the documents, embed them, retrieve by hybrid search (dense vectors plus keyword – dense alone misses part numbers and names), rerank, then…

  • Fine-tuning & Adapters LoRA and the PEFT family: small trainable deltas over frozen weights, so you tune millions of parameters instead of billions and swap adapters per…

  • Generative AI at Work The generation call is the easy tenth of the system.

Shelf four

Agents, tools & reinforcement

  • AI Agents A model plus a loop plus tools plus state, and the model is the smallest part.

  • Loops & Graphs A loop decides at runtime – model in charge, maximum flexibility, unbounded variance.

  • Tools & MCP Function calling with schemas, and MCP emerging as the standard for exposing tools across vendors – write once, plug into any model.

  • Memory Three different problems wearing one name: working context (this session), episodic notes (what happened before), durable facts (what stays true).

  • Reinforcement Learning Agent, environment, reward, policy.

  • RLHF & Preference Train a reward model on pairwise human preferences, then optimise the policy against it – PPO classically, the DPO family when you would rather skip…

Shelf five

Putting it to work

  • Evals & Hallucination Task-level suites, graders (exact-match where you can, LLM-as-judge where you must, with the judge itself evaluated), golden sets guarded from…

  • Guardrails & Responsible AI Least privilege for something that improvises: scoped credentials, allow-lists over deny-lists, approval gates on irreversible actions, sandboxes for…

  • MLOps & Deployment Versioning for models, data and prompts together – a prompt change is a deploy.

  • Customer Communications Template and content management, variable data, composition engines, channel orchestration across print, email, SMS and app, plus archive and…

  • Content & Documents Capture, classification, extraction and lifecycle over enterprise content, the classic ECM stack, with document intelligence turning scans into…

  • Cost, Latency & ROI Route easy traffic to small models and hard cases up the tier.

Search the notebook