Why Foundations?

Before we write any code, we need a mental map of how LLMs work. This part gives you the big picture — the concepts you'll implement in later parts.

No code in this part. Just concepts. We'll build your intuition first, then translate it into Python.

Why This Matters

Most tutorials jump straight into code. But without understanding why each piece exists, you're just copy-pasting magic spells.

After this part, you'll understand:

  • What LLMs actually do — hint: it's simpler than you think
  • The 6-step pipeline — how text becomes a prediction
  • Why each step exists — so the code makes sense later

How to Go Through This

  1. Read actively — Don't skim. Each section builds on the last.
  2. Use the analogies — We use factories, recipes, and libraries. Let them stick.
  3. Check your understanding — After each section, pause and summarize in your head.
  4. Don't memorize — Focus on intuition, not formulas. The code comes later.

The Goal

By the end of Foundations, you should be able to explain to a friend: "Here's how ChatGPT works, roughly." That mental model will make the code in Parts 3-7 click into place.

Take your time. This is the most important part to really understand. The code is easy once the concepts are clear.
Helpful?