How the 20 Phases of the AI Engineering Curriculum Are Structured

The AI Engineering curriculum is organized into 20 sequential phases that build from foundational tooling to advanced capstone projects, with each phase stored in the phases/ directory and following a standardized lesson structure containing code/, docs/en.md, outputs/, and quiz.json components.

The rohitg00/ai-engineering-from-scratch repository delivers a comprehensive, self-contained curriculum designed to teach AI engineering through progressive, hands-on implementation. According to the repository's README, the content is structured into 20 sequential phases enumerated in the "The shape of the curriculum" section, which includes a Mermaid diagram illustrating the progression from environment setup to production deployment.

The Complete 20-Phase Breakdown

The curriculum progresses through distinct domains of AI engineering, with each phase residing in a numbered folder under phases/:

  1. phases/00-setup-and-tooling — Setup & Tooling: Environment setup, Git, Docker, notebooks, and profiling
  2. phases/01-math-foundations — Math Foundations: Linear algebra, calculus, probability, optimization, and graph theory
  3. phases/02-ml-fundamentals — ML Fundamentals: Classical ML algorithms including regression, trees, SVMs, clustering, and pipelines
  4. phases/03-deep-learning-core — Deep Learning Core: Perceptron to multi-layer nets, back-propagation, optimizers, and mini-frameworks
  5. phases/04-computer-vision — Vision: Convolutions, CNNs, detection, segmentation, diffusion, ViT, and 3D vision
  6. phases/05-nlp-foundations-to-advanced — NLP: Foundations to Advanced: Tokenization, embeddings, seq-2-seq, attention, LLM-style generation, and RAG
  7. phases/06-speech-and-audio — Speech & Audio: Waveforms, spectrograms, ASR, Whisper, TTS, voice cloning, and evaluation
  8. phases/07-transformers-deep-dive — Transformers Deep Dive: Self-attention, multi-head mechanisms, positional encodings, BERT/GPT, MoE, and KV-cache
  9. phases/08-generative-ai — Generative AI: VAEs, GANs, diffusion, latent diffusion, ControlNet, and video/audio generation
  10. phases/09-reinforcement-learning — Reinforcement Learning: MDPs, dynamic programming, Q-learning, DQN, policy gradients, PPO, RLHF, and multi-agent systems
  11. phases/10-llms-from-scratch — LLMs from Scratch: Tokenizers, mini-GPT pre-training, distributed training, RLHF, and quantization
  12. phases/11-llm-engineering — LLM Engineering: Prompt engineering, RAG, fine-tuning (LoRA), function calling, and guardrails
  13. phases/12-multimodal-ai — Multimodal AI: Vision-language (CLIP, BLIP-2), audio-language (Whisper), video, and omni-models
  14. phases/13-tools-and-protocols — Tools & Protocols: Tool interfaces, MCP fundamentals, servers/clients, security, and routing
  15. phases/14-agent-engineering — Agent Engineering: Agent loops, planning, memory systems, LangGraph, AutoGen, and benchmarks
  16. phases/15-autonomous-systems — Autonomous Systems: Self-contained agents and autonomous system architectures
  17. phases/16-multi-agent-and-swarms — Multi-Agent & Swarms: Coordination, hierarchical orchestration, and swarm dynamics
  18. phases/17-infrastructure-and-production — Infrastructure & Production: Deployment, observability, logging, scaling, and CI/CD for AI services
  19. phases/18-ethics-and-alignment — Ethics & Alignment: Safety, bias mitigation, interpretability, and constitutional AI
  20. phases/19-capstone-projects — Capstone Projects: Real-world end-to-end projects integrating the full stack of skills

Uniform Lesson Structure Within Each Phase

Every phase contains multiple lessons that follow a rigid template defined in LESSON_TEMPLATE.md. Each lesson directory includes:

  • code/ — Implementation files and source code
  • docs/en.md — English documentation and instructional content
  • outputs/ — Generated artifacts, model checkpoints, or results
  • quiz.json — Assessment questions and answers

This structure ensures that whether you are exploring phases/03-deep-learning-core or phases/10-llms-from-scratch, the navigation pattern remains identical.

Key Files for Curriculum Navigation

Several critical files govern the organization and maintenance of the 20 phases:

  • README.md — Contains the curriculum overview, the Mermaid diagram enumerating all 20 phases, and lesson count statistics
  • ROADMAP.md — Tracks completion status, work-in-progress items, and upcoming content for each phase
  • LESSON_TEMPLATE.md — Guarantees consistent structure across all lessons in the repository
  • scripts/audit_lessons.py — Automates validation, README count syncing, and catalogue generation
  • site/build.js — Transforms the markdown curriculum into the public website at aiengineeringfromscratch.com
  • glossary/terms.md — Defines recurring concepts such as "MCP" and "Agent Loop"

Exploring the Curriculum Programmatically

You can interact with the 20-phase structure programmatically to automate learning workflows or build custom tooling.

List All Lessons in a Specific Phase

import os
import json
import pathlib

def list_lessons(phase_folder: str):
    base = pathlib.Path('phases') / phase_folder
    lessons = sorted(p.name for p in base.iterdir() if p.is_dir())
    return lessons

print(list_lessons('01-math-foundations'))   # → ['01-linear-algebra-intuition', ...]

Extract Documentation Metadata


# Show the metadata header of lesson 01 in Phase 1

sed -n '1,15p' phases/01-math-foundations/01-linear-algebra-intuition/docs/en.md

Run a Specific Lesson Implementation


# Python example – run the perceptron implementation from Phase 3

python phases/03-deep-learning-core/01-the-perceptron/code/perceptron.py

Query the Complete Phase Catalogue

const fs = require('fs');
const path = require('path');

const phases = fs.readdirSync('phases')
  .filter(name => fs.lstatSync(path.join('phases', name)).isDirectory());

console.log('All phases:', phases);

Summary

  • The curriculum consists of 20 sequential phases stored in phases/00-setup-and-tooling through phases/19-capstone-projects, as enumerated in the README's "The shape of the curriculum" section
  • Each phase follows a standardized lesson structure containing code/, docs/en.md, outputs/, and quiz.json directories
  • The LESSON_TEMPLATE.md enforces consistency across all lessons, while ROADMAP.md tracks completion status
  • Build and validation scripts in scripts/ (such as audit_lessons.py) automate curriculum maintenance
  • The site/build.js processor transforms the local markdown structure into the public-facing website

Frequently Asked Questions

The phases are designed to be completed sequentially from Phase 0 (Setup & Tooling) through Phase 19 (Capstone Projects). Each phase builds upon concepts from previous ones, starting with mathematical foundations and classical ML before progressing to deep learning, transformers, LLMs, and finally autonomous systems and production infrastructure.

How are individual lessons structured within each phase?

Every lesson follows a uniform template containing four components: a code/ directory for implementations, a docs/en.md file for instructional content, an outputs/ directory for artifacts, and a quiz.json file for assessments. This structure is enforced by the LESSON_TEMPLATE.md file and maintained through automated validation scripts.

Where can I find the roadmap and completion status of each phase?

The ROADMAP.md file in the repository root tracks the completion status, work-in-progress items, and upcoming content for all 20 phases. This file serves as the source of truth for curriculum development progress and planned enhancements.

How is the curriculum content transformed into the public website?

The site/build.js script processes the markdown curriculum and generates the static site deployed to aiengineeringfromscratch.com. This build system reads the phase structure from the phases/ directory and renders the documentation, code examples, and navigation hierarchies into the public-facing format.

Have a question about this repo?

These articles cover the highlights, but your codebase questions are specific. Give your agent direct access to the source. Share this with your agent to get started:

Share the following with your agent to get started:
curl -s "https://instagit.com/install.md"

Works with
Claude Codex Cursor VS Code OpenClaw Any MCP Client

Maintain an open-source project? Get it listed too →