rohitg00 /ai-engineering-from-scratch
Learn AI Engineering! Learn it. Build it. Ship it for others.
★ 79,036⑂ 14,093👁 460⑃ 640● 132▤ 12
More from this author
Download: Edition 2026.11.3: Agent Substrate 101 and Clean Lesson URLsEdition-2026.11.3 ↓2026.11.32026-11-13
+181
Daily
+1,113
Weekly
+12,336
Monthly
79,036
stars
14,093
forks
460
watchers
640
prs
132
issues
12
releases
README
Implement model internals, retrieval pipelines, and agent runtimes. Test them, inspect failures, and keep the code and evaluation results.
Start learning · Choose a path · Try a lab · Build a project · Browse the curriculum
Free, open source, MIT. Learn on the website, with a coding agent, or by running local code.
542 lessons. 20 phases. Python, TypeScript, Rust, Julia, Go.
Turn your coding agent into a tutor with one command:
bash
npx skills add rohitg00/ai-engineering-from-scratch
Read in your language
🇬🇧 English ·
🇨🇳 简体中文 ·
🇹🇼 繁體中文(台灣) ·
🇯🇵 日本語 ·
🇰🇷 한국어 ·
🇵🇹 Português ·
🇧🇷 Português (Brasil) ·
🇪🇸 Español ·
🇩🇪 Deutsch ·
🇫🇷 Français ·
🇮🇹 Italiano ·
🇳🇱 Nederlands ·
🇵🇱 Polski ·
🇨🇿 Čeština ·
🇷🇴 Română ·
🇭🇺 Magyar ·
🇬🇷 Ελληνικά ·
🇸🇪 Svenska ·
🇩🇰 Dansk ·
🇳🇴 Norsk ·
🇫🇮 Suomi ·
🇷🇺 Русский ·
🇺🇦 Українська ·
🇹🇷 Türkçe ·
🇮🇱 עברית ·
🇸🇦 العربية ·
🇮🇷 فارسی ·
🇮🇳 हिन्दी ·
🇧🇩 বাংলা ·
🇵🇰 اردو ·
🇹🇭 ไทย ·
🇻🇳 Tiếng Việt ·
🇮🇩 Bahasa Indonesia ·
🇵🇭 Tagalog
Sponsors
Your support keeps every lesson free and open source. See all supporters · Become a sponsor
Why build it from scratch
A framework call hides the part that breaks. When a loss turns into NaN or an agent repeats the same tool call, the person who wrote the small version knows where to look. Most lessons have you write that small version first and run it, then show where production tools do the same work.
Text version
- 01 · THE PROBLEM: An LLM returns text. It cannot act.
- 02 · BUILD IT: A ReAct loop in stdlib Python.
- 03 · USE IT: Where agent SDKs run the same loop.
- 04 · SHIP IT: skill-agent-loop.md, ready for your agent.
Learning paths
| Route | Starting lesson |
|---|---|
| Model foundations | Setup and tooling |
| LLM systems | Prompt engineering |
| Agents and delivery | The agent loop |
Compare career paths · Prerequisites and study time
Gradient descent
Twenty starting points follow gradient descent on a quadratic loss. The graph shows their positions and mean loss after each update.
Adjust the learning rate in the lesson · Compare GD, momentum, and Adam in code
Projects
Three projects with staged starters, reference implementations, and local graders. Run commands from the repository root after setup. Starters fail until you implement the stages.
01 · Retrieval Evaluation Lab · Python · Ranking metrics and regression checks
A candidate improves mean NDCG while one query ranks its most relevant evidence lower. Build a query-by-query comparison that reports the regression and can fail a release check.
Use Python 3.10+. Review RAG and model evaluation. Implement ranking validation, precision and recall, rank-sensitive metrics, then system comparison.
bash
python3 scripts/project_test.py retrieval-evaluation-lab \
--init learning-artifacts/retrieval-evalTop issues
#585docs: factual/self-contradiction errors in en.md across phases 00–19 (found during zh-TW translation review)9 comments · 2026-10-11#434[bug] ArgumentError in build_metrics during threshold tuning (03-logistic-regression)3 comments · 2026-08-25#504Windows CRLF checkouts make the shipped skill manifest fail1 comments · 2026-09-29#281[bug] Quiz Generation Bias: Correct Answer Is Frequently the Longest Option1 comments · 2026-06-10#192[bug] PyTorch CUDA wheels not available for Python 3.141 comments · 2026-05-26#168[Track] Add Rust implementations across the curriculum1 comments · 2026-05-25#793AI Engineering MCP is listed on MCP ServerList0 comments · 2026-11-13#783UI/UX improvement0 comments · 2026-11-12
Discussions
#800Ruang Latih: an Indonesian practice app built on this course (web + Windows)0 comments · 2026-11-14#653ai-engineering-from-scratch is #1 in Learning and cookbooks on Archestack (badge, if you want it)0 comments · 2026-10-21#518Video companion (EN + FR): may I name a YouTube channel "AI Engineering From Scratch"0 comments · 2026-09-30#474Recommended models and effort settings for saving tokens3 comments · 2026-09-20#419Build It section ??1 comments · 2026-08-19#416question on exercise03 from phases/01-math-foundations/10-dimensionality-reduction3 comments · 2026-08-18#413Why Rust?1 comments · 2026-08-16#403The course now speaks your language: lessons in 10 languages, the README in 330 comments · 2026-08-09
Latest release
Edition 2026.11.3: Agent Substrate 101 and Clean Lesson URLs v2026.11.3 2026-11-13Run stateful agents on Kubernetes with numbers you can check. This edition adds Agent Substrate 101, a manual built from 24 recorded experiments, and moves every course lesson to a short, readable URL. Start learning · Agent Substrate 101 · All manuals Agent Substrate 101 A manual for Agent Substrate v1.0.0, with kagent 1.0, agentgateway v1.7.0 and Agent Executor. It goes from the first actor to a cluster that you can size, connect, upgrade, and debug. | | | |---|---| | Sections | 40 in 9 parts, and 10 reference sections | | Figures | 75, most of them showing each run, not only a median |
相关报道 (5)
bilibili从零搭建 AI 工程能力:GitHub 热门项目《ai-engineering-from-scratch》深度解说2026-05-25blog.csdnGitHub 最火的 10 个项目(附上手命令+配图)2026-05-25www.80aj.com开源新课:包含503节课程的AI与Agent全栈工程路线图2026-07-20新浪网新浪网· - 新浪网2026-05-10新浪网你不是要学习AI吗?如你所愿,一套开源免费自学型课程:从搭环境开始、学数学,然后经典机器学习、深度学习,再到计算机视觉、NLP、Transformer 原理等等,每课包含可运行代码、课程讲义。边学边做项目,AI 时代太多人只会用工具而不知道工具背后是什么。如果你2026-05-04