Phase Progression in the AI Engineering Curriculum: From Foundational Math to Autonomous Systems
The rohitg00/ai-engineering-from-scratch repository implements a 20-phase curriculum that systematically advances learners from linear algebra and probability in phases/01-foundations-math/ through deep learning and large language models, ultimately culminating in autonomous multi-agent systems and production deployment within phases/19-capstone-projects/.
This open-source curriculum structures AI education as a linear progression of discrete phases, each contained within a numbered directory under the phases/ folder. The phase progression in the AI engineering curriculum ensures that mathematical prerequisites, algorithmic fundamentals, and systems engineering principles are mastered before students attempt to build autonomous, production-grade AI applications.
The 20-Phase Architecture
The repository organizes content into twenty sequenced phases, moving from pure mathematics to deployed autonomous systems.
Phase 01 – Foundational Mathematics
Phase 01 establishes the mathematical bedrock required for all subsequent machine learning. Located in phases/01-foundations-math/, this phase covers linear algebra, calculus, optimization, probability, and statistics. Learners implement core numerical methods that underpin gradient-based learning.
# phases/01-foundations-math/code/gradient_descent.py
def gradient_descent(f, grad_f, x0, lr=0.01, steps=100):
x = x0
for _ in range(steps):
x = x - lr * grad_f(x) # core math operation
return x
Phase 02 – Machine Learning Fundamentals
Phase 02 transitions from mathematics to algorithmic implementation in phases/02-ml-fundamentals/. This phase introduces supervised and unsupervised learning, feature engineering, and model validation. The curriculum emphasizes practical data handling techniques like imbalanced data correction and anomaly detection.
# phases/02-ml-fundamentals/code/feature_selection.py
from sklearn.feature_selection import mutual_info_classif
def select_top_features(X, y, k=10):
scores = mutual_info_classif(X, y)
top_idx = scores.argsort()[-k:]
return X[:, top_idx]
Phases 03 Through 05 – Deep Learning and Neural Architectures
These phases introduce neural network primitives, backpropagation, and specialized architectures. Phase 03 covers dense networks and activation functions, while Phase 04 explores convolutional networks for computer vision and recurrent networks for sequential data. Phase 05 focuses specifically on vision systems, including image processing and generative vision models.
Phases 06 Through 09 – Specialized Domains
The curriculum addresses domain-specific AI implementations across four critical modalities. Phase 06 (phases/06-speech-and-audio/) covers audio signal processing, automatic speech recognition (ASR), and text-to-speech (TTS) systems. Phase 07 transitions to natural language processing fundamentals, while Phase 08 implements large language models (LLMs) using transformer architectures. Phase 09 unifies these modalities through multimodal foundations, teaching cross-modal retrieval and vision-language models.
# phases/08-llms/code/transformer_block.py
import torch, torch.nn as nn
class SimpleTransformer(nn.Module):
def __init__(self, d_model, n_head):
super().__init__()
self.attn = nn.MultiheadAttention(d_model, n_head)
self.ff = nn.Sequential(nn.Linear(d_model, d_model*4),
nn.GELU(),
nn.Linear(d_model*4, d_model))
def forward(self, x):
attn_out, _ = self.attn(x, x, x)
x = x + attn_out
x = x + self.ff(x)
return x
Phases 10 and 11 – Reinforcement Learning and Alignment
Phase 10 introduces reinforcement learning fundamentals, including policy gradients and Q-learning. Phase 11 addresses AI safety through alignment techniques and interpretability. The phases/11-alignment/code/safety_gate.py file implements a constitutional safety filter for LLM outputs.
# phases/11-alignment/code/safety_gate.py
import json, re
PROHIBITED = {"kill", "harm", "illegal"}
def passes_gate(response: str) -> bool:
words = set(re.findall(r"\w+", response.lower()))
return not words.intersection(PROHIBITED)
def filter_response(resp):
if passes_gate(resp):
return resp
return json.dumps({"error": "Safety gate triggered"})
Phases 12 Through 14 – Tooling, Protocols, and Data Engineering
These phases focus on the software engineering layers of AI systems. Phase 13 (phases/13-tools-and-protocols/) defines skill ecosystems and protocol design for reusable AI components. Phase 14 addresses dataset construction, versioning, and data-centric AI evaluation harnesses.
Phases 15 Through 17 – Infrastructure and Production
The curriculum shifts to production engineering in Phase 17 (phases/17-infrastructure-and-production/), covering containerization, CI/CD pipelines, monitoring, and scalable inference. Students learn to deploy quantized models and implement token streaming for real-time applications.
Phases 18 Through 20 – Capstone Projects and Autonomous Systems
The final phases integrate all preceding knowledge into end-to-end autonomous systems. Phase 19 (phases/19-capstone-projects/) contains comprehensive projects including multi-agent software teams, personal AI tutors, and retrieval-augmented generation (RAG) systems. The 10-multi-agent-software-team subdirectory implements coordination protocols for multi-agent orchestration.
// phases/19-capstone-projects/10-multi-agent-software-team/code/ts/src/coordinator.ts
import { Agent } from "./agent";
export class Coordinator {
agents: Agent[];
constructor(agents: Agent[]) { this.agents = agents; }
async runTask(task: string) {
const results = await Promise.all(this.agents.map(a => a.process(task)));
return results.join("\n");
}
}
Phase 20 focuses on knowledge synthesis and publication, with resources located in the book/ directory for generating PDF and e-book versions of the curriculum.
Pedagogical Flow: How Concepts Interlock
The curriculum follows a strict dependency chain that mirrors real-world AI development.
-
Mathematical Foundations → Machine Learning: Linear algebra and calculus from
phases/01-foundations-math/provide the gradient computation methods required for the optimization algorithms inphases/02-ml-fundamentals/. -
Classical ML → Deep Learning: Once statistical learning principles are established, the curriculum introduces neural networks as differentiable function approximators, extending optimization concepts to high-dimensional parameter spaces.
-
Architectures → Domain Specialization: General deep learning principles feed into specialized implementations for vision (
phases/05-vision/), speech (phases/06-speech-and-audio/), and language (phases/07-nlp/). -
Domain Expertise → Large Scale Systems: Mastery of individual modalities enables the construction of multimodal systems and large language models, which then require reinforcement learning and safety alignment (
phases/10-rl/andphases/11-alignment/). -
Models → Production Infrastructure: With trained models in hand, learners progress to packaging, serving, and scaling them through
phases/13-tools-and-protocols/andphases/17-infrastructure-and-production/. -
Infrastructure → Autonomous Orchestration: The final integration combines production-grade serving with multi-agent coordination in
phases/19-capstone-projects/, resulting in systems that can retrieve information, enforce safety constraints, and operate autonomously.
Navigating the Repository Structure
Key files provide orientation across the 20-phase structure:
README.md: High-level overview and getting-started instructionsROADMAP.md: Master catalog of all phases, lessons, and completion statussite/build.js: Static site generation script that renders curriculum contentbook/README.md: Instructions for compiling the curriculum into published book formats
Summary
- The curriculum comprises 20 sequential phases housed in numbered directories under
phases/. - Phase 01 and Phase 02 establish mathematical and algorithmic fundamentals required for all subsequent work.
- Phases 06, 13, 17, and 19 represent critical transition points into speech/audio, tooling, production infrastructure, and autonomous capstone projects respectively.
- Code implementations evolve from simple gradient descent in Phase 01 to multi-agent coordination systems in Phase 19.
- The
ROADMAP.mdfile serves as the canonical reference for phase ordering and content status.
Frequently Asked Questions
What is the starting point for beginners in this AI engineering curriculum?
Beginners should start with Phase 01 in phases/01-foundations-math/, which covers linear algebra, calculus, and probability. This phase requires no prior AI knowledge and builds the mathematical maturity necessary for understanding gradient-based optimization in later phases.
How does the curriculum transition from theory to production systems?
The transition occurs between Phase 11 (Alignment) and Phase 17 (Infrastructure). After mastering model architecture and safety in earlier phases, students enter phases/13-tools-and-protocols/ to learn reusable component design, then phases/17-infrastructure-and-production/ to study containerization, monitoring, and scalable serving.
Which phase covers autonomous multi-agent systems?
Autonomous multi-agent systems are primarily covered in Phase 19 within phases/19-capstone-projects/, specifically in the 10-multi-agent-software-team/ subdirectory. This phase integrates coordination protocols, safety gates from phases/11-alignment/, and evaluation harnesses to create collaborative AI agents.
Where can I find the complete list of phases and their status?
The complete 20-phase progression is documented in ROADMAP.md at the repository root. This file catalogs each phase's learning objectives, key artifacts, and completion status, serving as the master index for the entire curriculum.
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 →