What Is the Build It / Use It Philosophy in AI Engineering?
The Build It / Use It philosophy is a dual-implementation learning method where you first code algorithms from raw mathematics without external libraries, then rebuild them with production frameworks like PyTorch to understand precisely what gets abstracted away.
This philosophy forms the structural backbone of the AI Engineering from Scratch curriculum by rohitg00. By forcing learners to implement algorithms twice—once from scratch and once with industry-standard tools—it transforms abstract mathematical concepts into transparent, production-ready engineering skills.
The Six-Beat Learning Structure
Every lesson in the repository follows a rigid narrative arc defined in README.md at lines 99-101:
MOTTO → PROBLEM → CONCEPT → BUILD IT → USE IT → SHIP IT
This six-beat structure repeats across all 503 lessons, from linear algebra fundamentals to large language model training. The consistent rhythm ensures that theoretical exploration always resolves into practical implementation and shipping a reusable artifact.
Build It: Implementing From First Principles
The Build It phase bans all external dependencies. You implement algorithms using only standard Python and raw mathematics—no PyTorch, no scikit-learn, no NumPy shortcuts.
In this phase, you derive back-propagation equations by hand, construct tokenizer grammars from scratch, and code attention matrices using only Python loops and math functions. This forced constraint exposes the underlying mechanics that high-level frameworks usually obscure. For example, when building linear regression from first principles, you calculate the slope and intercept manually using covariance and variance formulas rather than calling .fit().
# Build It – from first principles (no external deps)
import math
def fit_linear_regression(xs, ys):
n = len(xs)
mean_x = sum(xs) / n
mean_y = sum(ys) / n
# cov(x, y) / var(x)
slope = sum((x - mean_x) * (y - mean_y) for x, y in zip(xs, ys)) / \
sum((x - mean_x) ** 2 for x in xs)
intercept = mean_y - slope * mean_x
return slope, intercept
def predict(slope, intercept, x):
return slope * x + intercept
Use It: Translating to Production Frameworks
Immediately following the raw implementation, the Use It phase requires rebuilding the identical algorithm using production-grade libraries such as PyTorch, JAX, or scikit-learn. Because you have already implemented every mathematical step manually, you can see exactly what the framework abstracts away—where it optimizes memory, how it vectorizes operations, and why certain defaults exist.
# Use It – leveraging a production library (e.g., scikit-learn)
from sklearn.linear_model import LinearRegression
import numpy as np
def fit_linear_regression_sklearn(xs, ys):
model = LinearRegression().fit(np.array(xs).reshape(-1, 1), ys)
return model.coef_[0], model.intercept_
As documented in AGENTS.md at lines 11-12, this phase culminates in a reusable artifact—a prompt, skill, agent, or MCP server—that is built both from scratch and with a real-world stack, ready for immediate integration into downstream projects.
Real-World Application: The Mini-Framework Lesson
The philosophy comes alive in Phase 3 – Deep Learning Core, Lesson 10: Build Your Own Mini Framework. According to the lesson's README.md in phases/03-deep-learning-core/10-mini-framework/, students first hand-write a tiny autograd system in mini_framework.py, implementing backward passes and gradient accumulation manually.
They then swap this for PyTorch in mini_framework_torch.py, observing precisely where the hand-rolled version bottlenecks and how PyTorch optimizes tensor operations. The final model checkpoints ship to the outputs/ directory as production-ready artifacts.
Why This Philosophy Works
The Build It / Use It method delivers two distinct competitive advantages:
- Conceptual clarity: By writing the raw version first, you internalize the mathematics and logic. The library version becomes a transparent wrapper rather than a black-box mystery.
- Practical competence: You end each lesson with artifacts built using both first principles and industry-standard stacks, eliminating the gap between academic understanding and production engineering.
Summary
- The curriculum enforces a six-beat structure (
README.mdlines 99-101): MOTTO → PROBLEM → CONCEPT → BUILD IT → USE IT → SHIP IT. - Build It implements algorithms from raw mathematics without external libraries to force deep understanding of underlying mechanics.
- Use It rebuilds the same logic using PyTorch, JAX, or scikit-learn to reveal abstraction layers and optimization strategies.
- Every lesson produces a reusable artifact (agent, skill, or MCP server) documented in
AGENTS.mdlines 11-12. - Concrete examples exist in
phases/03-deep-learning-core/10-mini-framework/, containingmini_framework.pyandmini_framework_torch.py.
Frequently Asked Questions
How does the Build It / Use It philosophy differ from traditional AI courses?
Traditional courses often start with high-level frameworks, creating black-box dependence where students call .fit() without understanding gradient descent. The Build It / Use It method requires implementing algorithms from raw mathematics first—calculating slopes manually, coding back-propagation by hand—ensuring you understand the underlying mechanics before touching libraries like PyTorch or scikit-learn.
What specific files define the Build It / Use It curriculum structure?
The high-level six-beat structure is explicitly defined in README.md at lines 99-101. The philosophy's connection to reusable artifacts is detailed in AGENTS.md at lines 11-12. Specific implementations appear in lesson directories such as phases/03-deep-learning-core/10-mini-framework/, which contains both the raw implementation (mini_framework.py) and its PyTorch counterpart (mini_framework_torch.py).
Do I need prior machine learning experience to follow the Build It / Use It approach?
No prior framework experience is required. The curriculum progresses from linear algebra fundamentals to large language model training. The Build It phase assumes only basic Python knowledge, as you implement algorithms from mathematical first principles without external dependencies. The Use It phase then teaches the frameworks using your solid conceptual foundation.
What kind of artifacts are produced during the "Use It" phase?
According to AGENTS.md, each lesson culminates in a reusable artifact such as a prompt template, skill module, autonomous agent, or MCP server. These artifacts are built twice—first from scratch to prove understanding, then with production-grade stacks to prove practicality—making them ready for immediate integration into real-world projects.
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 →