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/:
phases/00-setup-and-tooling— Setup & Tooling: Environment setup, Git, Docker, notebooks, and profilingphases/01-math-foundations— Math Foundations: Linear algebra, calculus, probability, optimization, and graph theoryphases/02-ml-fundamentals— ML Fundamentals: Classical ML algorithms including regression, trees, SVMs, clustering, and pipelinesphases/03-deep-learning-core— Deep Learning Core: Perceptron to multi-layer nets, back-propagation, optimizers, and mini-frameworksphases/04-computer-vision— Vision: Convolutions, CNNs, detection, segmentation, diffusion, ViT, and 3D visionphases/05-nlp-foundations-to-advanced— NLP: Foundations to Advanced: Tokenization, embeddings, seq-2-seq, attention, LLM-style generation, and RAGphases/06-speech-and-audio— Speech & Audio: Waveforms, spectrograms, ASR, Whisper, TTS, voice cloning, and evaluationphases/07-transformers-deep-dive— Transformers Deep Dive: Self-attention, multi-head mechanisms, positional encodings, BERT/GPT, MoE, and KV-cachephases/08-generative-ai— Generative AI: VAEs, GANs, diffusion, latent diffusion, ControlNet, and video/audio generationphases/09-reinforcement-learning— Reinforcement Learning: MDPs, dynamic programming, Q-learning, DQN, policy gradients, PPO, RLHF, and multi-agent systemsphases/10-llms-from-scratch— LLMs from Scratch: Tokenizers, mini-GPT pre-training, distributed training, RLHF, and quantizationphases/11-llm-engineering— LLM Engineering: Prompt engineering, RAG, fine-tuning (LoRA), function calling, and guardrailsphases/12-multimodal-ai— Multimodal AI: Vision-language (CLIP, BLIP-2), audio-language (Whisper), video, and omni-modelsphases/13-tools-and-protocols— Tools & Protocols: Tool interfaces, MCP fundamentals, servers/clients, security, and routingphases/14-agent-engineering— Agent Engineering: Agent loops, planning, memory systems, LangGraph, AutoGen, and benchmarksphases/15-autonomous-systems— Autonomous Systems: Self-contained agents and autonomous system architecturesphases/16-multi-agent-and-swarms— Multi-Agent & Swarms: Coordination, hierarchical orchestration, and swarm dynamicsphases/17-infrastructure-and-production— Infrastructure & Production: Deployment, observability, logging, scaling, and CI/CD for AI servicesphases/18-ethics-and-alignment— Ethics & Alignment: Safety, bias mitigation, interpretability, and constitutional AIphases/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 codedocs/en.md— English documentation and instructional contentoutputs/— Generated artifacts, model checkpoints, or resultsquiz.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 statisticsROADMAP.md— Tracks completion status, work-in-progress items, and upcoming content for each phaseLESSON_TEMPLATE.md— Guarantees consistent structure across all lessons in the repositoryscripts/audit_lessons.py— Automates validation, README count syncing, and catalogue generationsite/build.js— Transforms the markdown curriculum into the public website at aiengineeringfromscratch.comglossary/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-toolingthroughphases/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/, andquiz.jsondirectories - The
LESSON_TEMPLATE.mdenforces consistency across all lessons, whileROADMAP.mdtracks completion status - Build and validation scripts in
scripts/(such asaudit_lessons.py) automate curriculum maintenance - The
site/build.jsprocessor transforms the local markdown structure into the public-facing website
Frequently Asked Questions
What is the recommended order for completing the 20 phases?
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:
curl -s "https://instagit.com/install.md" Maintain an open-source project? Get it listed too →