How the AI Engineering from Scratch Curriculum Structures Learning with the Build‑It / Use‑It Methodology

The AI Engineering from Scratch curriculum organizes every lesson into six sequential beats—MOTTO, PROBLEM, CONCEPT, BUILD IT, USE IT, and SHIP IT—forcing learners to implement algorithms from raw mathematics before validating them against production frameworks like PyTorch and scikit‑learn.

The rohitg00/ai-engineering-from-scratch repository rejects traditional black‑box tutorials by enforcing a strict Build‑It / Use‑It split across a 20‑phase learning stack. This methodology ensures that learners understand the underlying mechanics of every algorithm before touching high‑level libraries, creating a foundational literacy that survives framework churn.

The Six‑Beat Lesson Structure

Each self‑contained lesson follows a rigid narrative arc defined in the repository’s AGENTS.md and visualized in README.md lines 87‑98. This sequence forms the pedagogical spine of the curriculum.

MOTTO and PROBLEM

Every lesson opens with a MOTTO—a one‑line core idea that distills the lesson’s philosophy—and a PROBLEM statement that defines a concrete pain point or capability gap. This framing ensures learners understand why the algorithm matters before examining how it works.

CONCEPT

The CONCEPT beat provides intuitive explanations, mathematical notation, and diagrams that build mental models. This section bridges theory and implementation without writing code.

BUILD IT

The BUILD IT phase requires learners to implement the algorithm from raw math only, using pure Python or NumPy with no external ML frameworks. For example, in phases/14‑agent‑engineering/01‑the‑agent‑loop/code/agent_loop.py, learners write a ReAct‑style agent loop from first principles:


# phases/14-agent-engineering/01-the-agent-loop/code/agent_loop.py

# Build it – pure Python, no dependencies

def run(query, tools):
    history = [user(query)]
    for step in range(MAX_STEPS):
        msg = llm(history)                     # raw LLM call

        if msg.tool_calls:
            for call in msg.tool_calls:
                result = tools[call.name](**call.args)
                history.append(tool_result(call.id, result))
            continue
        return msg.content
    raise StepLimitExceeded

This forced manual implementation requires explicit handling of tool‑call parsing, step limits, and history management—mechanics that are typically hidden inside framework abstractions.

USE IT

Immediately following the raw implementation, the USE IT beat executes the same logic through a production library (e.g., openai.ChatCompletion, PyTorch, or scikit‑learn). Learners compare outputs, performance characteristics, and API designs against their hand‑crafted versions, demystifying the framework’s internal mechanics.

SHIP IT

Every lesson culminates in SHIP IT, where learners export a reusable artifact—such as a prompt template, skill definition, or MCP server—to phases/{phase}/{lesson}/outputs/. These artifacts are not toy examples; they are production‑ready components that integrate into real workflows. For instance, the agent loop lesson ships a Claude‑compatible skill file at phases/14‑agent‑engineering/01‑the‑agent‑loop/outputs/skill‑agent‑loop.md:


# phases/14-agent-engineering/01-the-agent-loop/outputs/skill-agent-loop.md

---
name: agent-loop
description: ReAct‑style loop for any tool list
phase: 14
lesson: 01
---
Implement a minimal agent loop that…

The 20‑Phase Learning Stack

The curriculum is architected as a stack of 20 phases, each adding a higher‑level abstraction atop the previous layer. As documented in README.md lines 99‑101, the progression moves from mathematical foundations through machine learning fundamentals, deep learning, computer vision, NLP, transformers, generative AI, reinforcement learning, LLMs, tools and protocols, and finally to agent engineering and production deployment.

This stacked design creates technical dependencies where later lessons reuse artifacts generated by earlier phases. The mathematical “floor” supports the production “roof,” ensuring that by the time learners reach framework‑heavy topics like agent engineering, they have already written minimal implementations of backpropagation, attention mechanisms, and gradient descent themselves.

Why Build‑It / Use‑It Works

Deep Understanding: Writing algorithms from scratch—such as manual backpropagation or attention score calculations—forces learners to internalize tensor operations and mathematical derivatives that frameworks normally obscure.

Framework Transparency: When learners subsequently run the identical algorithm through PyTorch or scikit‑learn, they possess the mental model to debug framework outputs, understand API design choices, and trace errors to their mathematical origins.

Reusable Artifacts: The SHIP IT requirement closes the learning loop by producing tangible assets. Each artifact is versioned and exportable, allowing learners to build a personal library of AI components that function in production environments.

Key Files Enforcing the Methodology

Several files in the repository ensure the Build‑It / Use‑It methodology is consistently applied:

  • README.md – Contains the curriculum overview, phase diagram, and the canonical description of the six‑beat flow (lines 87‑98).
  • AGENTS.md – Defines contributor conventions for lesson creation, mandating the Build‑It / Use‑It split and artifact shipping requirements.
  • site/build.js – Generates the public website from markdown sources, ensuring the Build‑It / Use‑It narrative structure remains visible in the published curriculum.
  • phases/14‑agent‑engineering/01‑the‑agent‑loop/code/agent_loop.py – Exemplifies the raw Python implementation required in the BUILD IT phase.
  • phases/14‑agent‑engineering/01‑the‑agent‑loop/outputs/skill‑agent‑loop.md – Demonstrates the shipped artifact format required by the SHIP IT phase.

To execute a lesson and observe the methodology in action:


# Clone the repository and run a Build‑It implementation

git clone https://github.com/rohitg00/ai-engineering-from-scratch.git
cd ai-engineering-from-scratch
python phases/14-agent-engineering/01-the-agent-loop/code/agent_loop.py

Summary

  • The curriculum enforces a six‑beat structure: MOTTO, PROBLEM, CONCEPT, BUILD IT, USE IT, and SHIP IT.
  • BUILD IT requires raw‑math implementations without frameworks; USE IT validates against production libraries.
  • SHIP IT produces reusable artifacts (prompts, skills, MCP servers) stored in lesson outputs/ directories.
  • The 20‑phase stack progresses from mathematics to production, with each phase building upon artifacts from previous layers.
  • Key files like AGENTS.md and site/build.js programmatically enforce this pedagogical structure across all contributions.

Frequently Asked Questions

What is the Build‑It / Use‑It methodology in AI engineering education?

The Build‑It / Use‑It methodology is a pedagogical framework that bifurcates every lesson into two implementation phases: learners first construct algorithms from mathematical primitives using only standard libraries, then reproduce the identical functionality using industry frameworks like PyTorch or scikit‑learn. This approach eliminates black‑box dependency and ensures learners comprehend the underlying linear algebra and calculus before abstracting it away.

How does the six‑beat lesson structure work?

Each lesson follows a rigid narrative sequence defined in the repository documentation: MOTTO establishes the core philosophy, PROBLEM defines the use case, CONCEPT builds intuition, BUILD IT mandates a framework‑free implementation, USE IT validates against production libraries, and SHIP IT exports a reusable artifact. This structure is enforced in AGENTS.md and visualized in README.md lines 87‑98.

What types of artifacts are shipped at the end of each lesson?

Artifacts vary by phase but include prompt templates, agent skills, MCP server configurations, and model weights. These are stored in each lesson’s outputs/ directory (e.g., phases/14‑agent‑engineering/01‑the‑agent‑loop/outputs/skill‑agent‑loop.md) and are designed for immediate integration into production AI workflows or agent orchestration systems.

How do the 20 phases progress from mathematics to production?

The curriculum is organized as a dependency stack: Phase 1 covers linear algebra and calculus; subsequent phases add ML fundamentals, deep learning, computer vision, NLP, transformers, generative AI, reinforcement learning, LLMs, tool use, and finally agent engineering and deployment. Each phase reuses concepts and artifacts from previous phases, ensuring that advanced topics rest on solid foundational knowledge rather than framework shortcuts.

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 →