Understand AI.
Design systems.
Make better decisions.

Learn AI from first principles through explanations, interactive visualizations, engineering decisions, experiments and real system challenges.

282 pages and 243 build exercises.

Attention step 1/4

Tokens attend to tokens

Q · Kᵀ / √d → softmax → weighted values, computed in the page.
Open lesson →
01tokens
02Q K V
03scores
04attention
modelslearnrelationships
models32%
learn38%
relationships30%

Q · Kᵀ / √d scores normalized with softmax

Understand it. See it work. Make the decision.

AI can write more of the implementation than ever. Your advantage is understanding what the system is doing, knowing where it fails, choosing the right design, and verifying the result.

  1. UNDERSTAND — Build the mental model before writing code.
  2. EXPLORE — Change inputs, adjust parameters, and watch the system respond.
  3. DECIDE — Choose between real engineering trade-offs under hardware constraints.
  4. BUILD — Implement the parts worth understanding directly in Python.
  5. VERIFY — Test assumptions, find failure modes, and decide whether it ships.

The control loop of a graph-based agent. Interactive version

InputRouter / PlannerAgent (tools)Agent (search)Agent (code)State UpdateOutput