Skip to content

AI Engineering from Scratch

A free, MIT-licensed course that teaches AI engineering by building models, retrieval, and agents from scratch

Stars
76.3k
Forks
13.5k
Licence
MIT
Language
Python
Last update
4 days ago
Type
Learning resource

What it is

This is a structured course with 542 lessons across 20 phases, covering math foundations, machine learning, LLM engineering, and agent engineering. Lessons are taught on a companion website, with a coding agent, or by running the local code in the repository. The README says the goal is to implement model internals, retrieval pipelines, and agent runtimes, test them, and keep the code and evaluation results.

  • Work through the setup and tooling lesson, then follow a learning path
  • Implement a retrieval evaluation project and run its staged tests with the provided script
  • Compare gradient descent, momentum, and Adam using the included optimizer code
  • Build the agent loop lessons into a small agent runtime

Great for

  • Students who want to understand how LLMs, retrieval, and agents work internally
  • Developers who prefer learning by writing code from scratch
  • Learners following the listed paths: model foundations, LLM systems, or agents and delivery
  • People who want hands-on projects with local graders to check their work

Not ideal for

  • People who only want a quick ready-made AI tool; this is a course, not an application
  • Complete beginners to programming, since the README lists prerequisites only in part and the study guide section was not included in the excerpt
  • Anyone expecting a single installable package; the README points to lessons and project folders rather than one install command
Step-by-step guide: how to use AI Engineering from ScratchInstall, first run, examples, tips and FAQs

How to get it

  1. 1

    Clone and build from source

    You'll need: Python 3.10+

    Clone the repository

    git clone https://github.com/rohitg00/ai-engineering-from-scratch
  2. 2

    Run it

    • Clone the repository and read the setup and tooling lesson on the website
    • Choose a learning path from the README table
    • Initialize a project with python3 scripts/project_test.py retrieval-evaluation-lab --init learning-artifacts/retrieval-evaluation-lab
    • Implement stage 1 and run the stage test with --stage 1 --strict
  3. 3

    Get the most out of it

    • Use the interactive gradient descent lab on the website to adjust the learning rate
    • Compare optimizer implementations in phases/01-math-foundations/08-optimization/code/optimizers.py
    • Follow the project challenges and keep the per-query comparison output as evidence of your work
    • Use the cheatsheet and PDF assets in the latest release as quick references

Downloads

Strengths

  • Free, open source under MIT, with lessons available on the website and locally
  • Projects include staged starters, reference solutions, and local graders for self-checking
  • Covers Python, TypeScript, Rust, and Julia according to the README

Trade-offs

  • The README excerpt is truncated, so the full curriculum, prerequisites, and setup steps are not visible here
  • Projects start failing by design until the learner implements each stage, which can be frustrating without guidance
  • The course is large (542 lessons), so the time commitment is substantial

How it compares

ProjectStarsTypeLevelUpdatedBest for
ai-engineering-from-scratch (this)76.3kLearning resourceintermediate4 days agoStudents who want to understand how LLMs, retrieval, and agents work internally
Prompt-Engineering-Guide79.8kLearning resourcebeginner8 months agoPeople who are new to prompting and want structured lessons with examples
awesome-ai-engineering22.5kCurated listbeginner15 days agoDevelopers who want an overview of the AI engineering topics covered in the description
AI-For-Beginners70.5kLearning resourcebeginner13 days agoBeginners who want a structured, self-paced introduction to AI
ai-engineering-hub40.8kLearning resourceintermediate5 days agoDevelopers who want working examples of RAG or agent systems to adapt
fashion-mnist12.9kLearning resourcebeginner4.4 years agoMachine learning students comparing classifiers on a familiar format

Stats synced from GitHub. The assessment above was drafted with AI from the project's README on 2026-10-29 and may miss recent changes — check the README before relying on a command. MIT licence: free to use, modify and distribute, including commercially, as long as you keep the copyright notice.