AI Engineering From Scratch
Learn it. Build it. Ship it for others.
Ask AI about AI Engineering From Scratch
Powered by Claude Β· Grounded in docs
I know everything about AI Engineering From Scratch. Ask me about installation, configuration, usage, or troubleshooting.
0/500
Reviews
Documentation
π§ 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?
| πΊ Traditional Courses | π§ This Course |
|---|---|
| Scope One slice (NLP or Vision or Agents) | Scope π Everything β math Β· ML Β· DL Β· NLP Β· vision Β· speech Β· transformers Β· LLMs Β· agents Β· swarms |
| Languages Python only | Languages π Python Β· π¦ TypeScript Β· π¦ Rust Β· π£ Julia |
| Output "I learned something" | Output π¦ A portfolio of tools, prompts, skills, and agents you can install |
| Depth Surface-level or theory-heavy | Depth π¬ Build from scratch first, then use frameworks |
| Format Videos you watch | Format π» Runnable code + docs + web app + AI-powered quizzes |
| Style Passive consumption | Style π€ AI-native β Claude Code skills test you as you go |
π€ 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:
|
π |
π΄ |
π€ |
π |
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
|
π£ Phase 1 β Math Foundations Β 22 lessonsΒ The intuition behind every AI algorithm, through code.
| # | 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 | π |
π΅ Phase 2 β ML Fundamentals Β 18 lessonsΒ Classical ML β still the backbone of most production AI.
π’ Phase 3 β Deep Learning Core Β 13 lessonsΒ Neural networks from first principles. No frameworks until you build one.
π Phase 4 β Computer Vision Β 28 lessonsΒ From pixels to understanding β image, video, 3D, VLMs, and world models.
π΄ Phase 5 β NLP: Foundations to Advanced Β 29 lessonsΒ Language is the interface to intelligence.
π’ Phase 6 β Speech & Audio Β 17 lessonsΒ Hear, understand, speak.
π’ Phase 7 β Transformers Deep Dive Β 14 lessonsΒ The architecture that changed everything.
π Phase 8 β Generative AI Β 14 lessonsΒ Create images, video, audio, 3D, and more.
| # | 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 | π |
π£ Phase 9 β Reinforcement Learning Β 12 lessonsΒ The foundation of RLHF and game-playing AI.
| # | 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 | π |
π§ Phase 10 β LLMs from Scratch Β 22 lessonsΒ Build, train, and understand large language models.
π₯ Phase 11 β LLM Engineering Β 15 lessonsΒ Put LLMs to work in production.
| # | 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 | π |
π© Phase 12 β Multimodal AI Β 25 lessonsΒ See, hear, read, and reason across modalities β from ViT patches to computer-use agents.
π¦ Phase 13 β Tools & Protocols Β 23 lessonsΒ The interfaces between AI and the real world.
| # | 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 | π |
π§ Phase 14 β Agent Engineering Β 30 lessonsΒ Build agents from first principles β loop, memory, planning, frameworks, benchmarks, production.
π© Phase 15 β Autonomous Systems Β 22 lessonsΒ Long-horizon agents, self-improvement, and the 2026 safety stack.
π© Phase 16 β Multi-Agent & Swarms Β 25 lessonsΒ Coordination, emergence, and collective intelligence.
β¬ Phase 17 β Infrastructure & Production Β 28 lessonsΒ Ship AI to the real world.
| # | 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 | π |
πͺ Phase 18 β Ethics, Safety & Alignment Β 30 lessonsΒ Build AI that helps humanity. Not optional.
π Phase 19 β Capstone Projects Β 17 projectsΒ 2026 end-to-end shippable products, 20-40 hours each.
π§° 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
|
π Foundational Papers Covered
|
π€ 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. β¨
