Pattern · Foundations

Yan's 7-pattern map

Eugene Yan

The canonical applied-LLM reference. The seven patterns sit on two axes — data ↔ user and defensive ↔ offensive — which together cover the whole surface of LLM products, not just agentic coding. We use the 2×2 to audit our own coverage: own deeply, touch lightly, or explicitly leave out (with reason).

CLOSER TO DATA CLOSER TO USER DEFENSIVE OFFENSIVE Evals owned · anchor of the practice Caching light · prompt cache; semantic cache rarely Fine-tuning out of scope · skills/hooks dominate RAG skeptical for code · tools/graphs beat embeddings Guardrails NEW entry · distinct from Hooks Defensive UX NEW entry · expectations · attribution · dismissal Feedback flywheel NEW entry · explicit + implicit · becomes next eval set owned new for us skeptical out of scope
Yan's 2×2, marked up with our practice's position. Most software-eng clients sit in the defensive/data and defensive/user quadrants and don't realize it.

Why fine-tuning is out of scope for us. In agentic coding, frontier off-the-shelf models with a good harness consistently outperform fine-tuned smaller models for the same dollar. Fine-tuning belongs to narrow specialized LLM products (classifiers, content moderation, voice agents). Recommend it only if a client has a non-agent LLM product and asks.

Eugene Yan · "Patterns for Building LLM-based Systems & Products"

Three uses. (1) Executive framing. Force the client to name whether they want defensive value (cost, safety, reliability) or offensive value (capability, knowledge). (2) Coverage audit. Place each proposed initiative on the matrix; gaps and overlaps surface immediately. (3) Reading list. Yan's article is the densest applied-LLM primer in the field — recommend it to a client's platform lead on day one.