About AI Engineering From Scratch
AI Engineering From Scratch is an MCP server in the Agents category: learn it. Build it. Ship it for others.
Install
git clone https://github.com/rohitg00/ai-engineering-from-scratchThis server has no ConduID identity, so agent calls to it are not receipted. Pin the version you install and review the source before granting it credentials.
Ask AI
Ask AI about AI Engineering From Scratch
Powered by Claude · Grounded in docs
Security checks
- ✓README presentThe repository ships documentation.
5 checks have not been run yet.
README
🧠 AI Engineering from Scratch
From linear algebra to autonomous agent swarms. learn AI with AI, then ship the tools.
🧭 Quick Navigation
🚀 Get Started · 🤖 AI-Native · 🗺️ The Journey · 🧰 Toolkit · 📚 Glossary · 🛣️ Roadmap · 🤝 Contribute · 🌐 Website
💬 "84% of students already use AI tools. Only 18% feel prepared to use them professionally.
This course closes that gap."
283+ lessons. 20 phases. ~320 hours. From linear algebra to autonomous agent swarms. Python, TypeScript, Rust, Julia. Every lesson produces something reusable: prompts, skills, agents, and MCP servers.
You don't just learn AI. You learn AI with AI. Then you build real things. Then you ship tools others can use.
🆚 Why This Course?
🤖 AI-Native Learning
This isn't a course you watch. It's a course you use with your AI coding agent.
🎯 Learn with AI, not just about AI
# 🧪 Find where to start based on what you already know
/find-your-level
# ✅ Quiz yourself after completing a phase
/check-understanding 3
# 📦 Every lesson produces a reusable artifact
ls phases/03-deep-learning-core/05-loss-functions/outputs/
# ├── prompt-loss-function-selector.md
# └── prompt-loss-debugger.md
🛠️ Built-in Claude Code Skills
🚢 Every Lesson Ships Something
Other courses end with "congratulations, you learned X." Our lessons end with a reusable tool:
📝Prompts Paste into any AI assistant for expert-level help
🎴Skills Install into Claude Code, Cursor, or any agent
🤖Agents Deploy as autonomous workers
🔌MCP Servers Plug into any MCP-compatible AI app
277-term searchable glossary. Full lesson catalog. ~306 hours of content with per-lesson time estimates. 🌐 Browse the website →
🗺️ The Journey
20 phases · 283+ lessons · click any phase to expand
Legend: hands-on implementation ·
concept + intuition
12 lessons
🛠️ Get your environment ready for everything that follows.
| # | Lesson | Type | Lang |
|---|---|---|---|
| 01 | Dev Environment | 🐍 🟦 🦀 | |
| 02 | Git & Collaboration | — | |
| 03 | GPU Setup & Cloud | 🐍 | |
| 04 | APIs & Keys | 🐍 🟦 | |
| 05 | Jupyter Notebooks | 🐍 | |
| 06 | Python Environments | 🐍 | |
| 07 | Docker for AI | 🐍 | |
| 08 | Editor Setup | — | |
| 09 | Data Management | 🐍 | |
| 10 | Terminal & Shell | — | |
| 11 | Linux for AI | — | |
| 12 | Debugging & Profiling | 🐍 |
| # | Lesson | Type | Lang |
|---|---|---|---|
| 01 | Linear Algebra Intuition | 🐍 🟣 | |
| 02 | Vectors, Matrices & Operations | 🐍 🟣 | |
| 03 | Matrix Transformations & Eigenvalues | 🐍 🟣 | |
| 04 | Calculus for ML: Derivatives & Gradients | 🐍 | |
| 05 | Chain Rule & Automatic Differentiation | 🐍 | |
| 06 | Probability & Distributions | 🐍 | |
| 07 | Bayes' Theorem & Statistical Thinking | 🐍 | |
| 08 | Optimization: Gradient Descent Family | 🐍 | |
| 09 | Information Theory: Entropy, KL Divergence | 🐍 | |
| 10 | Dimensionality Reduction: PCA, t-SNE, UMAP | 🐍 | |
| 11 | Singular Value Decomposition | 🐍 🟣 | |
| 12 | Tensor Operations | 🐍 | |
| 13 | Numerical Stability | 🐍 | |
| 14 | Norms & Distances | 🐍 | |
| 15 | Statistics for ML | 🐍 | |
| 16 | Sampling Methods | 🐍 | |
| 17 | Linear Systems | 🐍 | |
| 18 | Convex Optimization | 🐍 | |
| 19 | Complex Numbers for AI | 🐍 | |
| 20 | The Fourier Transform | 🐍 | |
| 21 | Graph Theory for ML | 🐍 | |
| 22 | Stochastic Processes | 🐍 |
| # | Lesson | Type | Lang |
|---|---|---|---|
| 01 | Generative Models: Taxonomy & History | 🐍 | |
| 02 | Autoencoders & VAE | 🐍 | |
| 03 | GANs: Generator vs Discriminator | 🐍 | |
| 04 | Conditional GANs & Pix2Pix | 🐍 | |
| 05 | StyleGAN | 🐍 | |
| 06 | Diffusion Models — DDPM from Scratch | 🐍 | |
| 07 | Latent Diffusion & Stable Diffusion | 🐍 | |
| 08 | ControlNet, LoRA & Conditioning | 🐍 | |
| 09 | Inpainting, Outpainting & Editing | 🐍 | |
| 10 | Video Generation | 🐍 | |
| 11 | Audio Generation | 🐍 | |
| 12 | 3D Generation | 🐍 | |
| 13 | Flow Matching & Rectified Flows | 🐍 | |
| 14 | Evaluation: FID, CLIP Score | 🐍 |
| # | Lesson | Type | Lang |
|---|---|---|---|
| 01 | MDPs, States, Actions & Rewards | 🐍 | |
| 02 | Dynamic Programming | 🐍 | |
| 03 | Monte Carlo Methods | 🐍 | |
| 04 | Q-Learning, SARSA | 🐍 | |
| 05 | Deep Q-Networks (DQN) | 🐍 | |
| 06 | Policy Gradients — REINFORCE | 🐍 | |
| 07 | Actor-Critic — A2C, A3C | 🐍 | |
| 08 | PPO | 🐍 | |
| 09 | Reward Modeling & RLHF | 🐍 | |
| 10 | Multi-Agent RL | 🐍 | |
| 11 | Sim-to-Real Transfer | 🐍 | |
| 12 | RL for Games | 🐍 |
| # | Lesson | Type | Lang |
|---|---|---|---|
| 01 | Prompt Engineering: Techniques & Patterns | 🐍 | |
| 02 | Few-Shot, CoT, Tree-of-Thought | 🐍 | |
| 03 | Structured Outputs | 🐍 🟦 | |
| 04 | Embeddings & Vector Representations | 🐍 | |
| 05 | Context Engineering | 🐍 🟦 | |
| 06 | RAG: Retrieval-Augmented Generation | 🐍 🟦 | |
| 07 | Advanced RAG: Chunking, Reranking | 🐍 | |
| 08 | Fine-Tuning with LoRA & QLoRA | 🐍 | |
| 09 | Function Calling & Tool Use | 🐍 | |
| 10 | Evaluation & Testing | 🐍 | |
| 11 | Caching, Rate Limiting & Cost | 🐍 | |
| 12 | Guardrails & Safety | 🐍 | |
| 13 | Building a Production LLM App | 🐍 | |
| 14 | Model Context Protocol (MCP) | 🐍 | |
| 15 | Prompt Caching & Context Caching | 🐍 |
| # | Lesson | Type | Lang |
|---|---|---|---|
| 01 | The Tool Interface | 🐍 | |
| 02 | Function Calling Deep Dive | 🐍 | |
| 03 | Parallel and Streaming Tool Calls | 🐍 | |
| 04 | Structured Output | 🐍 | |
| 05 | Tool Schema Design | 🐍 | |
| 06 | MCP Fundamentals | 🐍 | |
| 07 | Building an MCP Server | 🐍 | |
| 08 | Building an MCP Client | 🐍 | |
| 09 | MCP Transports | 🐍 | |
| 10 | MCP Resources and Prompts | 🐍 | |
| 11 | MCP Sampling | 🐍 | |
| 12 | MCP Roots and Elicitation | 🐍 | |
| 13 | MCP Async Tasks | 🐍 | |
| 14 | MCP Apps | 🐍 | |
| 15 | MCP Security I — Tool Poisoning | 🐍 | |
| 16 | MCP Security II — OAuth 2.1 | 🐍 | |
| 17 | MCP Gateways and Registries | 🐍 | |
| 18 | MCP Auth in Production — DCR + JWKS on iii | 🐍 | |
| 19 | A2A Protocol | 🐍 | |
| 20 | OpenTelemetry GenAI | 🐍 | |
| 21 | LLM Routing Layer | 🐍 | |
| 22 | Skills and Agent SDKs | 🐍 | |
| 23 | Capstone — Tool Ecosystem | 🐍 |
| # | Lesson | Type | Lang |
|---|---|---|---|
| 01 | Managed LLM Platforms — Bedrock, Azure OpenAI, Vertex AI | 🐍 | |
| 02 | Inference Platform Economics — Fireworks, Together, Baseten, Modal | 🐍 | |
| 03 | GPU Autoscaling on Kubernetes — Karpenter, KAI Scheduler | 🐍 | |
| 04 | vLLM Serving Internals — PagedAttention, Continuous Batching, Chunked Prefill | 🐍 | |
| 05 | EAGLE-3 Speculative Decoding in Production | 🐍 | |
| 06 | SGLang and RadixAttention for Prefix-Heavy Workloads | 🐍 | |
| 07 | TensorRT-LLM on Blackwell with FP8 and NVFP4 | 🐍 | |
| 08 | Inference Metrics — TTFT, TPOT, ITL, Goodput, P99 | 🐍 | |
| 09 | Production Quantization — AWQ, GPTQ, GGUF, FP8, NVFP4 | 🐍 | |
| 10 | Cold Start Mitigation for Serverless LLMs | 🐍 | |
| 11 | Multi-Region LLM Serving and KV Cache Locality | 🐍 | |
| 12 | Edge Inference — ANE, Hexagon, WebGPU, Jetson | 🐍 | |
| 13 | LLM Observability Stack Selection | 🐍 | |
| 14 | Prompt Caching and Semantic Caching Economics | 🐍 | |
| 15 | Batch APIs — the 50% Discount as Industry Standard | 🐍 | |
| 16 | Model Routing as a Cost-Reduction Primitive | 🐍 | |
| 17 | Disaggregated Prefill/Decode — NVIDIA Dynamo and llm-d | 🐍 | |
| 18 | vLLM Production Stack with LMCache KV Offloading | 🐍 | |
| 19 | AI Gateways — LiteLLM, Portkey, Kong, Bifrost | 🐍 | |
| 20 | Shadow, Canary, and Progressive Deployment | 🐍 | |
| 21 | A/B Testing LLM Features — GrowthBook and Statsig | 🐍 | |
| 22 | Load Testing LLM APIs — k6, LLMPerf, GenAI-Perf | 🐍 | |
| 23 | SRE for AI — Multi-Agent Incident Response | 🐍 | |
| 24 | Chaos Engineering for LLM Production | 🐍 | |
| 25 | Security — Secrets, PII Scrubbing, Audit Logs | 🐍 | |
| 26 | Compliance — SOC 2, HIPAA, GDPR, EU AI Act, ISO 42001 | 🐍 | |
| 27 | FinOps for LLMs — Unit Economics and Multi-Tenant Attribution | 🐍 | |
| 28 | Self-Hosted Serving Selection — llama.cpp, Ollama, TGI, vLLM, SGLang | 🐍 |
🧰 Course Output: The Toolkit
Other courses give you a certificate. This one gives you a toolkit.
Every lesson produces a reusable artifact — a prompt, skill, agent, or MCP server you can install and use immediately. By the end of the course you have:
outputs/
├── 📝 prompts/ Prompt templates for every AI task
├── 🎴 skills/ SKILL.md files for AI coding agents
├── 🤖 agents/ Agent definitions ready to deploy
└── 🔌 mcp-servers/ MCP servers you built during the course
💡 Install them with SkillKit. Plug them into Claude Code, Cursor, or any AI agent. These are real tools, not homework.
📐 How Each Lesson Works
phases/XX-phase-name/NN-lesson-name/
├── 💻 code/ Runnable implementations (Python, TS, Rust, Julia)
├── 📖 docs/
│ └── en.md Lesson documentation
└── 📦 outputs/ Prompts, skills, agents produced by this lesson
🔄 Every lesson follows 6 steps
| Step | What happens |
|---|---|
| 🎯 Motto | One-line core idea that sticks |
| ❓ Problem | A concrete scenario where not knowing this hurts |
| 🧠 Concept | Mermaid diagrams and intuition — no code yet |
| 🔨 Build It | Implement from scratch in pure Python. No frameworks. |
| ⚙️ Use It | Same thing with PyTorch, sklearn, or the real tool |
| 🚢 Ship It | The prompt, skill, or agent this lesson produces |
🔑 The Build It / Use It split is the key. You understand what the framework does because you built it yourself first.
🚀 Getting Started
🅰️ Option A — Just start reading
Pick any completed lesson from the website or expand any phase above.
🅱️ Option B — Clone and run
git clone https://github.com/rohitg00/ai-engineering-from-scratch.git
cd ai-engineering-from-scratch
python phases/01-math-foundations/01-linear-algebra-intuition/code/vectors.py
🅲 Option C — Find your level (recommended) ⭐
If you already know some ML/DL, don't start from Phase 1. Use the built-in assessment:
# In Claude Code:
/find-your-level
This 10-question quiz maps your knowledge to a starting phase and builds a personalized path with hour estimates.
✅ Prerequisites
- You can write code (Python or any language)
- You want to understand how AI actually works, not just call APIs
👤 Who This Is For
| 🧑💻 You are... | 🚪 Start at... | ⏱️ Time to complete |
|---|---|---|
| 🌱 New to programming + AI | Phase 0 (Setup) | ~306 hours |
| 🐍 Know Python, new to ML | Phase 1 (Math) | ~270 hours |
| 📊 Know ML, new to DL | Phase 3 (Deep Learning) | ~200 hours |
| 🧠 Know DL, want LLMs/agents | Phase 10 (LLMs from Scratch) | ~100 hours |
| 🚀 Senior eng, want agents only | Phase 14 (Agent Engineering) | ~60 hours |
📰 Why This Matters Now
📈 The Industry Signal
"The hottest new programming language is English." — Andrej Karpathy (tweet)
"Software engineering is being remade in front of our eyes." — Boris Cherny, creator of Claude Code
"Models will keep getting better. The skill that compounds is knowing what to build." — Industry consensus, 2026
📚 Foundational Papers Covered
- 📄 Attention Is All You Need (Vaswani et al., 2017) → Phase 7
- 📄 GPT-3: Language Models are Few-Shot Learners → Phase 10
- 📄 Denoising Diffusion Probabilistic Models → Phase 8
- 📄 InstructGPT / RLHF → Phase 10
- 📄 Direct Preference Optimization (DPO) → Phase 10
- 📄 Chain-of-Thought Prompting → Phase 11
- 📄 ReAct: Reasoning + Acting in LLMs → Phase 14
- 📄 MCP: Model Context Protocol (Anthropic) → Phase 13
🤝 Contributing
We welcome contributions of all kinds — new lessons, translations, fixes, and outputs.
| 📋 Want to... | 👉 Read |
|---|---|
| Contribute a lesson or fix | CONTRIBUTING.md |
| Fork for your team or school | FORKING.md |
| See the lesson template | LESSON_TEMPLATE.md |
| Track progress | ROADMAP.md |
| Code of conduct | CODE_OF_CONDUCT.md |
⭐ Star History
🌟 If this helped you, please star the repo! It keeps the project alive.
💚 Built with care by Rohit Ghumare and the community.
📜 MIT License — Use it however you want. Fork it. Teach it. Sell it. Ship it.
✨ From linear algebra to autonomous agent swarms — one lesson at a time. ✨
README copy captured when this server was indexed; it may lag the repository. The original is authoritative.