Book 9

LLMs & AI

Language models, tokens, context, and running AI responsibly

Free · Digital Textbook

How LLMs work, token budgets, context windows, prompts, and self-hosted vs cloud AI on Canadian infrastructure.

  • 7 chapters
  • ~2 hours
  • Hands-on exercises in every chapter
Start Reading
Table of Contents

Chapters

Read in order the first time — later chapters reference the lab company introduced in Chapter 1.

  1. 01 Welcome to Book 9 From APIs to AI — LLMs, tokens, and context length. 8 min
  2. 02 What Are LLMs? Predictive text at scale — training, inference, limits. 30 min
  3. 03 Tokens & Tokenization How text becomes numbers, pricing, and counting tokens. 28 min
  4. 04 Context Length & Memory Context windows, truncation, RAG, staying within limits. 30 min
  5. 05 Prompts & System Messages Roles, instructions, few-shot examples, guardrails. 25 min
  6. 06 AI on Your Infrastructure Self-hosted vs cloud API, privacy, Canadian data paths. 28 min
  7. 07 Capstone: Workshop Co. AI Plan FAQ bot scope, token budget, hosting decision. 40 min