Cheat Sheet
The core rule
“Prompts are suggestions. Code is enforcement.” Every exam question that offers a prompt-level fix AND a code-level fix → code wins.
Mental Models
1. Prompts vs Code
Prompt instruction → Claude may or may not follow Code enforcement → Claude cannot violate Schema constraint → Structurally impossible to violate Exam application: whenever a question offers both a prompt fix AND a code/schema fix → code wins
2. Architecture Simplicity
Single agent → lowest overhead, least capable Workflow → predictable, fast, rigid Multi-agent → flexible, powerful, expensive Inter-agent communication = extra API call Sequential multi-agent = overhead without parallelization benefit Only add agents when task genuinely needs them
3. HITL Calibration
Too little HITL → dangerous (autonomous irreversible actions) Too much HITL → useless (agent asks about everything) Correct HITL → surgical, based on: - Irreversibility - External party impact - Recovery time - Catastrophic failure risk
4. RAG Symptoms → Fixes
"Incomplete, missing info" → MORE chunks (increase K) "Contradictory, confused" → FEWER chunks (decrease K) "Accurate but missing context" → NEIGHBORING chunks (N-1, N+1) Multiple symptoms → DYNAMIC K per query type Bad chunk strategy → FIX CHUNKS FIRST, then K
5. Schema as Safety Mechanism
Schema slot exists → information can be captured correctly No schema slot → Claude defaults to something plausible (dangerous in medical, legal, financial) Before fixing prompts: ask "does the schema have a slot for the correct information?" If no → fix schema first.
Deterministic code signal words
When any of these appear, the answer is deterministic code, not prompts:
- Legal requires...
- Compliance mandates...
- Must be identical across...
- Audit trail needed...
- Cannot vary...
- Regulatory requirement...
The 5 Exam Traps
| Trap | Description | The Fix |
|---|---|---|
| Single fix when both needed | Picking one valid control when two independent controls exist | Always check for "both A and B" option |
| Prompt over code | Reaching for few-shot examples when schema/code enforcement exists | Ask: is there a structural fix? |
| Aggregate hiding segments | 97% overall accuracy looks good but hides 71% on one segment | Always segment analysis before automation |
| Complex = Claude | Assuming complex business rules need Claude | Complex but explicit rules → deterministic code |
| Retry environment errors | Retrying 503/DB down errors | Environment errors → escalate immediately, never retry |
Exam Day Tips
- Read every question twice — the scenario contains all the clues
- Check for "both A and B" options — when two fixes operate at different layers, the combined answer is usually correct
- "Critical flaw" = safety gap — never structural improvement
- "Must never" = code enforcement — never prompt instructions
- Prompts are suggestions, code is enforcement — the universal tiebreaker
- First instinct is usually right — don't overthink
- Watch for signal words: "legal requires", "compliance mandates", "cannot vary" → deterministic code
- "NOW" + prior failures + explicit human request → escalate immediately, no questions
- Aggregate metrics hide segment failures — always check per-segment before automating
- Environment errors → never retry — 503, DB down, network failure = escalate immediately