The 20 Phases of the AI Engineering Curriculum: Complete Guide to rohitg00/ai-engineering-from-scratch
The rohitg00/ai-engineering-from-scratch repository organizes AI engineering education into 20 sequential phases, from initial setup and tooling through capstone projects, with each phase building upon previous knowledge in a structured phases/ directory format.
The open-source repository rohitg00/ai-engineering-from-scratch provides a comprehensive, self-contained AI engineering curriculum designed to take learners from foundational tooling to production-ready systems. This educational framework is meticulously structured into 20 distinct phases that progress linearly, ensuring each concept builds upon previously mastered material through hands-on lessons and real-world projects. All phases are enumerated in the Mermaid diagram located in the repository’s README.md at lines 57-80, which visualizes the complete learning trajectory.
Phase Overview and Sequential Structure
The curriculum follows a strict sequential design where each phase resides in the phases/ directory using a zero-padded naming convention: phases/<NN>-<phase-name>/. This structure creates clear prerequisite relationships, with higher-numbered phases assuming mastery of all previous content. Within each phase, individual lessons follow a uniform template defined in LESSON_TEMPLATE.md, containing four standard components: code/ for implementations, docs/en.md for instructional content, outputs/ for generated artifacts, and quiz.json for knowledge verification.
The repository maintains curriculum progress and upcoming work in ROADMAP.md, while automation scripts in scripts/—such as audit_lessons.py—validate structural integrity and synchronize documentation counts across phases.
The 20 Phases of the AI Engineering Curriculum
-
Phase 0: Setup & Tooling (
phases/00-setup-and-tooling) - Environment setup, Git, Docker, Jupyter notebooks, and performance profiling tools. -
Phase 1: Math Foundations (
phases/01-math-foundations) - Linear algebra, calculus, probability theory, optimization techniques, and graph theory fundamentals. -
Phase 2: ML Fundamentals (
phases/02-ml-fundamentals) - Classical machine learning algorithms including regression, decision trees, SVMs, clustering methods, and ML pipelines. -
Phase 3: Deep Learning Core (
phases/03-deep-learning-core) - Perceptron architecture, multi-layer neural networks, backpropagation, optimization algorithms, and building a mini-framework. -
Phase 4: Computer Vision (
phases/04-computer-vision) - Convolution operations, CNN architectures, object detection, image segmentation, diffusion models, Vision Transformers (ViT), and 3D vision. -
Phase 5: NLP Foundations to Advanced (
phases/05-nlp-foundations-to-advanced) - Text tokenization, word embeddings, sequence-to-sequence models, attention mechanisms, LLM-style text generation, and Retrieval-Augmented Generation (RAG). -
Phase 6: Speech & Audio (
phases/06-speech-and-audio) - Audio waveforms, spectrograms, Automatic Speech Recognition (ASR), OpenAI Whisper, Text-to-Speech (TTS), voice cloning, and audio evaluation metrics. -
Phase 7: Transformers Deep Dive (
phases/07-transformers-deep-dive) - Self-attention mechanisms, multi-head attention, positional encodings, BERT/GPT architectures, Mixture of Experts (MoE), and KV-cache optimization. -
Phase 8: Generative AI (
phases/08-generative-ai) - Variational Autoencoders (VAEs), Generative Adversarial Networks (GANs), diffusion models, latent diffusion, ControlNet, and video/audio generation. -
Phase 9: Reinforcement Learning (
phases/09-reinforcement-learning) - Markov Decision Processes (MDPs), dynamic programming, Q-learning, DQN, policy gradients, PPO, RLHF, and multi-agent systems. -
Phase 10: LLMs from Scratch (
phases/10-llms-from-scratch) - Byte Pair Encoding (BPE) tokenizers, mini-GPT pre-training implementation, distributed training strategies, RLHF, and model quantization. -
Phase 11: LLM Engineering (
phases/11-llm-engineering) - Prompt engineering techniques, RAG system construction, parameter-efficient fine-tuning (LoRA), function calling, and safety guardrails. -
Phase 12: Multimodal AI (
phases/12-multimodal-ai) - Vision-language models (CLIP, BLIP-2), audio-language integration (Whisper), video understanding, and omni-modal architectures. -
Phase 13: Tools & Protocols (
phases/13-tools-and-protocols) - Tool interface design, Model Context Protocol (MCP) fundamentals, server/client implementations, security considerations, and routing mechanisms. -
Phase 14: Agent Engineering (
phases/14-agent-engineering) - Agent loop architectures, planning algorithms, memory systems, LangGraph implementation, AutoGen frameworks, and benchmarking. -
Phase 15: Autonomous Systems (
phases/15-autonomous-systems) - Self-contained agent development and swarm intelligence basics (continuing from Phase 14 concepts). -
Phase 16: Multi-Agent & Swarms (
phases/16-multi-agent-and-swarms) - Multi-agent coordination, hierarchical orchestration patterns, and emergent swarm dynamics. -
Phase 17: Infrastructure & Production (
phases/17-infrastructure-and-production) - Model deployment strategies, observability, logging systems, scaling techniques, and CI/CD pipelines for AI services. -
Phase 18: Ethics & Alignment (
phases/18-ethics-and-alignment) - AI safety frameworks, bias mitigation techniques, interpretability methods, and constitutional AI approaches. -
Phase 19: Capstone Projects (
phases/19-capstone-projects) - End-to-end real-world projects integrating the full stack of AI engineering skills from previous phases.
Prerequisite Relationships and Learning Path
The AI engineering curriculum enforces a linear progression where each phase serves as a foundation for subsequent modules. Phase 0 (Setup & Tooling) establishes the development environment required for all future work. Mathematical concepts from Phase 1 directly enable the algorithmic implementations in Phase 2 (ML Fundamentals) and Phase 3 (Deep Learning Core).
Deep learning knowledge becomes prerequisite for specialized domains: Phase 4 (Computer Vision) and Phase 5 (NLP) both require mastery of multi-layer networks and backpropagation from Phase 3. Phase 7 (Transformers Deep Dive) bridges into Phase 10 (LLMs from Scratch), which requires understanding attention mechanisms and positional encodings. Similarly, Phase 11 (LLM Engineering) depends on both transformer architectures and generative AI concepts from Phase 8, while Phase 14 (Agent Engineering) synthesizes knowledge from LLM engineering (Phase 11) and tool protocols (Phase 13).
The curriculum culminates in Phase 19 (Capstone Projects), which assumes completion of all previous phases, particularly production infrastructure (Phase 17) and ethics (Phase 18), to deliver deployable, responsible AI systems.
Programmatically Exploring the Curriculum
You can navigate the curriculum structure programmatically using the repository’s consistent file organization.
List All Lessons in a Phase (Python)
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
# Example: List lessons in Phase 1 (Math Foundations)
print(list_lessons('01-math-foundations'))
# Output: ['01-linear-algebra-intuition', '02-calculus-for-ml', ...]
Extract Lesson Metadata (Bash)
# Display the YAML front-matter from lesson documentation
sed -n '1,15p' phases/01-math-foundations/01-linear-algebra-intuition/docs/en.md
Query the Complete Phase Catalog (Node.js)
const fs = require('fs');
const path = require('path');
const phases = fs.readdirSync('phases')
.filter(name => fs.lstatSync(path.join('phases', name)).isDirectory())
.sort();
console.log('All phases:', phases);
// Output includes: ['00-setup-and-tooling', '01-math-foundations', ...]
Run Lesson Implementations
# Execute the perceptron implementation from Phase 3
python phases/03-deep-learning-core/01-the-perceptron/code/perceptron.py
Key Repository Files and Structure
Several critical files support the 20-phase curriculum structure:
README.md- Contains the Mermaid diagram enumerating all phases at lines 57-80, lesson counts, and navigation instructions.ROADMAP.md- Tracks completion status, work-in-progress phases, and upcoming curriculum additions.LESSON_TEMPLATE.md- Guarantees consistent lesson structure across all 20 phases.phases/<NN>-<phase-name>/- Root directories for each phase (e.g.,phases/04-computer-vision/), containing all lessons, documentation, code, and outputs.scripts/audit_lessons.py- Automates validation, README count synchronization, and catalogue generation.site/build.js- Static site generator that transforms the markdown curriculum into the public website ataiengineeringfromscratch.com.glossary/terms.md- Defines recurring technical concepts such as "MCP" and "Agent Loop" used across phases.
Summary
- 20 sequential phases cover the complete AI engineering stack from environment setup to production deployment and ethics.
- Strict prerequisite relationships ensure conceptual coherence, with each phase building upon all previous work in the
phases/directory. - Standardized lesson format across all phases includes executable code, documentation, outputs, and quizzes.
- Programmatically navigable structure enables automation, validation, and custom tooling for curriculum management.
- Open-source implementation in
rohitg00/ai-engineering-from-scratchprovides the full educational framework with real-world capstone integration.
Frequently Asked Questions
What is the recommended learning path through the 20 phases of the AI engineering curriculum?
The curriculum is designed for strict sequential progression from Phase 0 through Phase 19. Each phase assumes mastery of all previous content, particularly the mathematical foundations (Phase 1) and deep learning core (Phase 3) that underpin later specialized topics like transformers (Phase 7) and LLMs (Phase 10). The repository’s README.md contains a Mermaid diagram at lines 57-80 that visualizes this linear dependency chain.
How are individual lessons structured within each phase?
Every lesson follows a uniform four-component structure defined in LESSON_TEMPLATE.md: a code/ directory containing implementations, a docs/en.md file with instructional content, an outputs/ directory for generated artifacts, and a quiz.json file for assessment. This standardization enables the scripts/audit_lessons.py validator to ensure consistency across all 20 phases.
Can I skip phases if I have prior experience in certain areas?
While the repository allows self-paced navigation, the prerequisite relationships are designed to be cumulative, with later phases assuming specific implementation details from earlier ones. For example, Phase 10 (LLMs from Scratch) requires the custom mini-framework built in Phase 3 and the transformer internals from Phase 7. Skipping may result in missing critical implementation details not covered in standard external resources.
What tools and frameworks are introduced in the initial Setup & Tooling phase?
Phase 0 (Setup & Tooling) establishes the complete development environment including Git version control, Docker containerization, Jupyter notebook configuration, and Python profiling tools. This foundation enables the executable code examples in all subsequent phases, ensuring learners can run implementations from phases/03-deep-learning-core/ through phases/19-capstone-projects/ without environment configuration issues.
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 →