What Is AI Engineering From Scratch
AI Engineering From Scratch is an open-source educational project hosted on GitHub under the username rohitg00. It is designed to teach the fundamentals and practical aspects of building AI systems by implementing core components from first principles. The project emphasizes hands-on learning through coding, testing, and inspection of failures, with the goal of helping learners understand how AI engineering works in practice.
The primary language used throughout the project is Python, though it also incorporates TypeScript, Rust, and Julia in various lessons and exercises. The curriculum is structured into 20 phases containing a total of 542 lessons, covering topics such as model foundations, retrieval pipelines, agent runtimes, and optimization techniques like gradient descent.
How the Project Works
The project follows a learn-by-doing approach. Each lesson combines conceptual explanations with practical coding tasks. Learners are encouraged to implement model internals, build retrieval systems, and develop agent runtimes, then test their implementations and analyze where they fail. This process of building, testing, and inspecting is central to the project’s methodology.
One example of this approach is found in the optimization section, where learners visualize gradient descent on a quadratic loss function. Twenty starting points are shown updating according to the gradient, with mean loss tracked after each step. This visualization is tied to a lesson where users can adjust the learning rate and compare different optimizers like gradient descent, momentum, and Adam using provided code.
The curriculum includes three structured projects that guide learners through increasingly complex tasks. Each project provides a starter implementation that initially fails, requiring the learner to complete specific stages to make it work. These projects come with reference implementations and local graders to validate progress.
Project Examples and Learning Paths
One project, the Retrieval Evaluation Lab, focuses on ranking metrics and regression checks in retrieval-augmented generation (RAG) systems. Learners build a query-by-query comparison tool that detects when a change improves overall performance but causes a regression on individual queries. The goal is to create a reproducible evaluation method that uses per-query deltas and stored judgments to assess system changes without claiming to measure answer correctness.
Another project, the Agent Trace Debugger, teaches trace analysis in agent systems. Using TypeScript for the frontend and Python for grading, learners parse JSONL traces, validate parent-child relationships in execution intervals, and use interval arithmetic to separate overlapping work. The output includes an HTML timeline and a JSON regression report that preserves exclusive token counts per span to avoid double-counting.
The project offers three main learning paths: Model Foundations, LLM Systems, and Agents and Delivery. Each path starts with a foundational lesson — such as setting up a development environment, learning prompt engineering, or understanding the agent loop — and progresses through related topics. Learners can compare career paths and review prerequisites and estimated study time through linked resources.
Who It’s For and How It’s Used
AI Engineering From Scratch is intended for developers, students, and engineers who want to move beyond using AI APIs and understand how the underlying systems are built. By implementing components like optimizers, retrieval pipelines, and agent loops from scratch, learners gain insight into the design trade-offs and failure modes that appear in real-world AI systems.
The material is accessible in multiple ways: learners can study via the project’s website, use an integrated coding agent for guidance, or run the code locally after setting up the environment. All content is free and released under the MIT license, allowing broad reuse and adaptation.
Accessibility and Global Reach
The project supports accessibility through multilingual availability. The website and lessons can be read in numerous languages, including English, Spanish, French, German, Japanese, Korean, Portuguese (both European and Brazilian variants), Russian, Ukrainian, Turkish, Arabic, Hebrew, Hindi, Bengali, Urdu, Thai, Vietnamese, Indonesian, Tagalog, and several others. This wide language support reflects an effort to make the material accessible to a global audience.
Sponsorship and Sustainability
The project acknowledges sponsors whose support helps keep the lessons free and open source. A section of the README invites users to view all supporters or become sponsors themselves, indicating a reliance on community backing to maintain and expand the educational content.
Considerations and Caveats
As an open-source educational project, AI Engineering From Scratch does not claim to be a formal certification program or accredited course. Its value lies in self-directed learning and practical implementation. While the star count on GitHub indicates significant community interest, the project does not publish benchmarks, performance comparisons, or adoption metrics related to industry use.
The curriculum is subject to updates and maintenance by its maintainers. Users should refer to the official website and repository for the most current lesson paths, project instructions, and setup requirements. Since the project involves running code and implementing algorithms, learners need a compatible development environment, with specific version requirements noted for certain projects (e.g., Python 3.10+ for the Retrieval Evaluation Lab, Node.js 22.18+ for the Agent Trace Debugger).
There are no claims of partnerships with companies, funding rounds, or commercial products associated with the project. Its growth appears driven by word-of-mouth, developer interest in hands-on AI education, and the increasing demand for practical understanding of AI systems beyond prompt engineering or API usage.
Conclusion
AI Engineering From Scratch represents a growing trend in AI education that emphasizes depth over abstraction. By requiring learners to build and debug core components such as optimization algorithms, retrieval evaluators, and agent tracers, it aims to cultivate a stronger intuition for how AI systems behave under the hood. Its multilingual accessibility, open licensing, and project-based structure make it a notable resource for those seeking to understand AI engineering through direct implementation.
Source: https://github.com/rohitg00/ai-engineering-from-scratch





