Study guides / CCDV-F

Quick reference

One condensed cheat-sheet per domain - the tables and rules worth re-reading right before the exam.

HTTP Error Code Reference

Statuserror.typeCauseRetryable?Fix
400invalid_request_errorMalformed request: bad JSON, missing required param, invalid tool schema, non-alternating rolesNoFix the request itself
401authentication_errorMissing, invalid, or revoked API key (or both ANTHROPIC_API_KEY and ANTHROPIC_AUTH_TOKEN set at once)NoFix credentials
403permission_errorKey is valid but lacks access to this model, beta feature, or org resourceNoGrant access or use a different key
404not_found_errorBad endpoint or invalid/deprecated model ID (e.g. dotted claude-sonnet-4.6 instead of claude-sonnet-4-6)NoFix the model ID or endpoint
413request_too_largeRequest body exceeds size limit - oversized images or unbounded historyNoShrink the payload
429rate_limit_errorYour account exceeded its RPM/TPM/TPD limitYesBack off; honor retry-after
500api_errorTransient problem on Anthropic's sideYesBackoff and retry
529overloaded_errorAnthropic's infrastructure at capacity (not your usage)YesBackoff; consider routing elsewhere

Read the status code, error.type, and message together - the message almost always names the exact field or condition at fault. Always log request_id on failures.

SDK Auto-Retry Behavior

Telling Similar Codes Apart

PairDistinctionDistractor to Reject
401 vs 403401 = identity never proven (bad/missing key). 403 = identity proven, but not authorized for this resource.'Fixing' a 403 by rotating the API key - the key is already fine
429 vs 529429 = your account's own rate limit. 529 = Anthropic's infrastructure is overloaded, unrelated to your usage.Treating both as the same 'your fault, slow down' signal
400 on a tool-calling requestSchema validation fails before the model ever runs - nothing about model behavior is implicated.Re-prompting or blaming the model's reasoning for a schema 400

Exception catch order (Python): most specific first - NotFoundErrorRateLimitErrorAPIStatusErrorAPIConnectionError. Since RateLimitError subclasses APIStatusError, put it first or the general clause swallows it silently.

Evaluation Harness: The Three Components

Grading Method Comparison

MethodUse WhenWatch Out For
Exact-match / programmaticOne correct answer: classification label, extracted field, regex, numeric toleranceDefault to this whenever the task allows it - don't reach for a rubric unnecessarily
Human ratingOpen-ended output, high-stakes or low-volume reviewDoesn't scale; use for calibration spot-checks even when automated grading is primary
LLM-as-judge (rubric)Open-ended output at scale: summary quality, tone, instruction-followingSelf-preference bias if judge shares a model family with the model under test; needs a fixed rubric prompt + periodic human re-check

Before/After Comparison: Do / Don't

DoDon't
Hold the test set and grading criteria fixed; change exactly one variable (prompt, model, or parameter)Change the dataset and the prompt in the same comparison - you lose the ability to attribute the score difference
Log model ID, prompt version/hash, dataset version, and timestamp with every runRely on memory of how 'the last version' scored
Use a stronger/different model as judge than the one under test; fix the rubric promptLet a model grade its own family's output with no fixed rubric or human check
Run multiple times / use a larger dataset and compare distributions before declaring a winDeclare an improvement (or a fixed regression) from one run on a small sample - a few points can be noise
Include deliberately hard/known-failure cases in the datasetBuild the dataset only from cases the current prompt already passes