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:

The 5 Exam Traps

TrapDescriptionThe Fix
Single fix when both neededPicking one valid control when two independent controls existAlways check for "both A and B" option
Prompt over codeReaching for few-shot examples when schema/code enforcement existsAsk: is there a structural fix?
Aggregate hiding segments97% overall accuracy looks good but hides 71% on one segmentAlways segment analysis before automation
Complex = ClaudeAssuming complex business rules need ClaudeComplex but explicit rules → deterministic code
Retry environment errorsRetrying 503/DB down errorsEnvironment errors → escalate immediately, never retry

Exam Day Tips

  1. Read every question twice — the scenario contains all the clues
  2. Check for "both A and B" options — when two fixes operate at different layers, the combined answer is usually correct
  3. "Critical flaw" = safety gap — never structural improvement
  4. "Must never" = code enforcement — never prompt instructions
  5. Prompts are suggestions, code is enforcement — the universal tiebreaker
  6. First instinct is usually right — don't overthink
  7. Watch for signal words: "legal requires", "compliance mandates", "cannot vary" → deterministic code
  8. "NOW" + prior failures + explicit human request → escalate immediately, no questions
  9. Aggregate metrics hide segment failures — always check per-segment before automating
  10. Environment errors → never retry — 503, DB down, network failure = escalate immediately