Field Notes
Practitioner case studies (composite teaching cases, labeled as such) and working patterns.
- The Token Bill That Tripled — Traffic flat, invoice 3×: a post-mortem of four context leaks — unbounded history, duplicated chunks, an uncacheable preamble, and output nobody capped.
- The Silent Model Swap — A JSON pipeline rots for three weeks after a model version update nobody asked for — retries and live prompt surgery make it worse, and the fix is a pin, a gate, and a hard schema boundary.
- The RAG That Retrieved Nothing — A support assistant shipped with fluent, confident answers that never touched the corpus — and the three-layer diagnosis that explained why.
- The Eval-First Migration — How we swap models without fear: freeze the golden set before shopping, shortlist by requirements, review every flip, and canary with the rollback criteria already written.
- Prompt Caching by Design — Cache-hit economics are decided the day the template is written: stable content first, variable content last, one versioned prefix per deploy — and named variables for knowing it is working.
- The Two-Model Router — Route easy traffic to a small model and hard traffic to a flagship: when it actually pays, how to build the router in three rungs, and how quality erodes when you stop watching the boundary.