The AI / ML roadmap, five lines at a time.
Every concept from what a dataset is through to reproducing research papers, explained in five lines and graded as you go. Each module is numbered in the order it is meant to be read; every one of the 356 concepts has its five lines free.
Jump to a module
How machines learn from data, the main algorithm families, and how to measure whether any of it worked.
- 1What is Machine Learning?Basics
- 2DatasetBasics
- 3Missing DataBasics
- 4FeaturesBasics
- 5Labels / TargetsBasics
- 6TrainingBasics
- 7ParametersBasics
- 8HyperparametersHow
- 9Training / Validation / Test SetsBasics
- 10Supervised LearningBasics
- 11Unsupervised LearningBasics
- 12Self-Supervised LearningHow
- 13Reinforcement Learning basicsBasics
- 14RegressionBasics
- 15ClassificationBasics
- 16Class ImbalanceHow
- 17Loss FunctionBasics
- 18Cross-EntropyHow
- 19OptimizationBasics
- 20Gradient DescentBasics
- 21OverfittingBasics
- 22UnderfittingBasics
- 23Bias and VarianceBasics
- 24Data LeakageHow
- 25Feature EngineeringHow
- 26Feature ScalingHow
- 27RegularizationHow
- 28Linear RegressionHow
- 29Logistic RegressionHow
- 30KNN (K-Nearest Neighbours)How
- 31Naive BayesHow
- 32Decision TreesHow
- 33Random ForestHow
- 34EnsemblingHow
- 35SVM (Support Vector Machine)How
- 36K-MeansHow
- 37DBSCANHow
- 38PCAHow
- 39Curse of DimensionalityEdge
- 40Gradient BoostingHow
- 41XGBoostEdge
- 42Confusion MatrixBasics
- 43AccuracyBasics
- 44PrecisionBasics
- 45RecallBasics
- 46F1 ScoreBasics
- 47ROC-AUCHow
- 48PR-AUCHow
- 49CalibrationHow
- 50MAEBasics
- 51MSEBasics
- 52RMSEBasics
- 53R squaredBasics
- 54Cross-ValidationHow
- 55Hyperparameter TuningHow
Neural networks from a single neuron up to the training tricks that make deep models actually converge.
- 1PerceptronBasics
- 2Neural NetworksBasics
- 3Weights and BiasesBasics
- 4Weight InitializationHow
- 5Activation FunctionsBasics
- 6Forward PropagationBasics
- 7Loss Functions in Deep LearningBasics
- 8BackpropagationBasics
- 9Autograd and the Computational GraphHow
- 10Gradient ClippingHow
- 11Learning Rate ScheduleHow
- 12GradientsBasics
- 13Vanishing and Exploding GradientsEdge
- 14Gradient Descent in NetworksBasics
- 15SGD (Stochastic Gradient Descent)Basics
- 16Epochs, Batches and IterationsBasics
- 17AdamHow
- 18AdamWHow
- 19Early StoppingHow
- 20DropoutHow
- 21Batch NormalizationHow
- 22Layer NormalizationHow
- 23PyTorchHow
- 24GPU TrainingHow
- 25Mixed Precision TrainingEdge
Getting machines to read images: convolution, CNN architectures, detection, segmentation and vision transformers.
- 1Images and PixelsBasics
- 2ConvolutionBasics
- 3FiltersBasics
- 4PaddingBasics
- 5StrideBasics
- 6PoolingBasics
- 7Receptive FieldBasics
- 8CNNsBasics
- 9Image ClassificationBasics
- 10Data AugmentationBasics
- 11Transfer LearningBasics
- 12ResNetHow
- 13Efficient ArchitecturesHow
- 14Object DetectionBasics
- 15Intersection over UnionBasics
- 16Non-Maximum SuppressionBasics
- 17YOLOBasics
- 18Image SegmentationBasics
- 19Semantic, Instance and Panoptic SegmentationHow
- 20U-NetHow
- 21Vision TransformersEdge
- 22OCRHow
Turning language into numbers, and the recurrent architectures that handled sequences before transformers arrived.
- 1Text PreprocessingBasics
- 2Stemming and LemmatizationBasics
- 3TokenizationBasics
- 4Bag of WordsBasics
- 5N-GramsBasics
- 6TF-IDFBasics
- 7Text ClassificationBasics
- 8Sentiment AnalysisBasics
- 9Named Entity RecognitionBasics
- 10Word EmbeddingsBasics
- 11Static vs Contextual EmbeddingsEdge
- 12Semantic SimilarityBasics
- 13Cosine SimilarityHow
- 14RNNsHow
- 15LSTMsHow
- 16GRUsHow
- 17Sequence-to-SequenceHow
- 18Language ModellingHow
- 19PerplexityEdge
- 20BLEU and ROUGEEdge
The attention mechanism piece by piece, and how the encoder, decoder and decoder-only stacks are assembled from it.
- 1AttentionBasics
- 2Self-AttentionBasics
- 3Cross-AttentionHow
- 4Query, Key and ValueBasics
- 5Scaled Dot-Product AttentionBasics
- 6Why Attention Costs O(n²)How
- 7Multi-Head AttentionBasics
- 8Positional EncodingBasics
- 9Rotary EmbeddingsEdge
- 10Feed-Forward LayersBasics
- 11Residual ConnectionsBasics
- 12Layer Normalization in TransformersBasics
- 13Pre-NormHow
- 14The Transformer BlockBasics
- 15EncoderHow
- 16BERTEdge
- 17DecoderHow
- 18Encoder-DecoderHow
- 19Decoder-Only ArchitectureHow
What a large language model actually does at each step, and the sampling knobs that shape what comes out.
- 1TokensBasics
- 2TokenizersBasics
- 3Embeddings in LLMsBasics
- 4Parameters in LLMsBasics
- 5PretrainingBasics
- 6Base vs Instruct ModelsBasics
- 7Scaling LawsEdge
- 8Emergent AbilitiesEdge
- 9Next-Token PredictionBasics
- 10LogitsBasics
- 11SoftmaxBasics
- 12Context WindowBasics
- 13In-Context LearningHow
- 14HallucinationHow
- 15Knowledge CutoffHow
- 16InferenceBasics
- 17The KV CacheHow
- 18TemperatureHow
- 19Top-k SamplingHow
- 20Top-p SamplingHow
- 21Sampling StrategiesHow
- 22Reasoning ModelsEdge
Structuring what you send a model so the output is reliable, parseable and hard to hijack.
- 1System PromptsBasics
- 2Role Prompting and PersonasBasics
- 3InstructionsBasics
- 4ContextBasics
- 5Lost in the MiddleHow
- 6ConstraintsBasics
- 7Zero-Shot PromptingBasics
- 8Few-Shot PromptingBasics
- 9Chain of ThoughtHow
- 10Self-ConsistencyHow
- 11Prompt ChainingHow
- 12Structured OutputsBasics
- 13Output Parsing and RetriesHow
- 14Prompt TemplatesBasics
- 15Tool CallingBasics
- 16Prompt InjectionEdge
- 17Prompt EvaluationHow
Representing meaning as vectors, and the index structures that find the nearest ones fast enough to matter.
- 1Embedding ModelsBasics
- 2Vector SpacesBasics
- 3Cosine Similarity in SearchBasics
- 4Cosine, Dot Product and EuclideanBasics
- 5Nearest-Neighbour SearchBasics
- 6Dense RetrievalBasics
- 7Sparse RetrievalBasics
- 8Hybrid SearchBasics
- 9Reciprocal Rank FusionHow
- 10RerankingHow
- 11FAISSHow
- 12Vector DatabasesBasics
- 13Metadata FilteringBasics
- 14HNSWHow
- 15IVF IndexesHow
- 16Vector QuantizationEdge
- 17Recall vs LatencyHow
Grounding a model in your own documents: the full pipeline from raw files through to a cited answer.
- 1Document IngestionBasics
- 2ParsingBasics
- 3ChunkingBasics
- 4Parent Document RetrievalHow
- 5Contextual RetrievalHow
- 6Embedding ChunksBasics
- 7IndexingBasics
- 8RetrievalBasics
- 9Reranking in RAGHow
- 10Context ConstructionHow
- 11Grounded GenerationBasics
- 12CitationsBasics
- 13RAG vs Long ContextEdge
- 14Query RewritingHow
- 15Hybrid RAGHow
- 16Graph RAGEdge
- 17Agentic RAGEdge
- 18Corrective and Self-RAGEdge
- 19Multimodal RAGEdge
Changing the weights rather than the prompt, and knowing when that is actually the right lever.
- 1Supervised Fine-TuningBasics
- 2Instruction TuningBasics
- 3Continued PretrainingHow
- 4Full Fine-Tuning vs PEFTHow
- 5LoRAHow
- 6QLoRAHow
- 7PEFTHow
- 8AdaptersHow
- 9Model MergingEdge
- 10Dataset PreparationBasics
- 11Synthetic Data GenerationHow
- 12Fine-Tuning EvaluationBasics
- 13Catastrophic ForgettingEdge
- 14RAG vs Fine-TuningBasics
- 15When Fine-Tuning FailsHow
Models that take actions in a loop: tools, planning, memory, and knowing when to hand control back to a person.
- 1Function CallingBasics
- 2ToolsBasics
- 3MCP (Model Context Protocol)How
- 4PlanningBasics
- 5Agent LoopsBasics
- 6ReActBasics
- 7Reflection and Self-CritiqueHow
- 8Error Recovery and RetriesHow
- 9StateHow
- 10MemoryHow
- 11Context CompactionHow
- 12Tool SelectionHow
- 13Computer UseEdge
- 14WorkflowsBasics
- 15Multi-Agent SystemsEdge
- 16Human-in-the-LoopBasics
- 17Agent EvaluationHow
Models that create rather than classify: autoencoders, GANs, diffusion, and the multimodal systems built on them.
- 1AutoencodersBasics
- 2VAEsBasics
- 3Latent SpaceBasics
- 4GANsBasics
- 5Mode CollapseHow
- 6Diffusion ModelsBasics
- 7Schedulers and Sampling StepsHow
- 8Image GenerationBasics
- 9Inpainting and OutpaintingHow
- 10Text-to-ImageBasics
- 11Conditioning and ControlNetHow
- 12Text-to-VideoEdge
- 13Speech-to-TextBasics
- 14Text-to-SpeechBasics
- 15Multimodal ModelsBasics
- 16CLIPHow
- 17Vision-Language ModelsHow
- 18Watermarking and ProvenanceEdge
Deciding whether the thing you built actually works, especially when there is no single correct answer.
- 1Model EvaluationBasics
- 2Dataset EvaluationBasics
- 3LLM EvaluationHow
- 4Building an Eval SetBasics
- 5Offline vs Online EvaluationBasics
- 6RAG EvaluationHow
- 7Retrieval MetricsHow
- 8FaithfulnessHow
- 9GroundednessHow
- 10RelevanceBasics
- 11Hallucination TestingHow
- 12Red TeamingEdge
- 13Human EvaluationBasics
- 14LLM-as-JudgeHow
- 15Pairwise Comparison and EloHow
- 16BenchmarkingBasics
- 17Sample SizeHow
- 18Regression Testing for PromptsHow
Everything between a working notebook and a service other people depend on: shipping, tracking, watching and paying for it.
- 1APIsBasics
- 2FastAPIBasics
- 3DockerBasics
- 4DatabasesBasics
- 5Cloud BasicsBasics
- 6Batch vs Real-Time InferenceBasics
- 7CI/CDBasics
- 8Canary and Shadow DeploymentsHow
- 9Model VersioningHow
- 10Model RegistryHow
- 11Experiment TrackingHow
- 12LoggingBasics
- 13MonitoringBasics
- 14Tracing and ObservabilityEdge
- 15CachingHow
- 16Rate LimitsHow
- 17Fallbacks and Graceful DegradationHow
- 18Cost OptimizationEdge
- 19Latency OptimizationHow
- 20Serving FrameworksEdge
- 21Model RoutingEdge
- 22Prompt VersioningHow
How AI systems get attacked through their inputs, their data and their tools, and what actually stops it.
- 1OWASP LLM Top 10Basics
- 2Direct and Indirect InjectionBasics
- 3JailbreakingBasics
- 4Insecure Output HandlingBasics
- 5Excessive AgencyHow
- 6Data Leakage in AI SystemsBasics
- 7PII ProtectionBasics
- 8Membership Inference and Model InversionEdge
- 9Data PoisoningHow
- 10Supply Chain SecurityHow
- 11Adversarial AttacksEdge
- 12Model ExtractionEdge
- 13Denial of WalletEdge
- 14Secure Tool UseHow
- 15SandboxingHow
- 16AI GuardrailsBasics
Reinforcement learning through to RLHF, plus the compression and systems tricks that make frontier models runnable.
- 1Reinforcement LearningBasics
- 2AlignmentHow
- 3MDPsHow
- 4RewardsBasics
- 5Q-LearningBasics
- 6PolicyBasics
- 7Policy GradientsHow
- 8Exploration and ExploitationHow
- 9PPOHow
- 10RLHFHow
- 11Reward HackingEdge
- 12DPOHow
- 13Knowledge DistillationHow
- 14QuantizationEdge
- 15Model CompressionEdge
- 16PruningHow
- 17Mixture-of-ExpertsEdge
- 18Distributed TrainingEdge
- 19GPU and CUDAHow
- 20Flash AttentionEdge
- 21Inference OptimizationEdge
- 22Speculative DecodingEdge
- 23Continuous BatchingEdge
Moving from consuming the literature to producing it: reading, reproducing, experimenting and publishing.
- 1Reading Research PapersBasics
- 2Reading Mathematical NotationBasics
- 3Reproducing PapersHow
- 4Survey PapersBasics
- 5Implementing Architectures from ScratchHow
- 6Running ExperimentsHow
- 7Ablation StudiesHow
- 8Developing New MethodsEdge
- 9Publishing ResearchHow
- 10Staying CurrentBasics
- 11Research EthicsBasics
All 356 concepts, A to Z, when you know the name and just want the page. The roadmap above is the reading order; this is the index.