PrepGenAICerts

Matching Recovery Strategy to Failure Type

Core

Select recovery strategies and verify fixes with evals · Difficulty 2/5

0%
recovery-strategyretry-backoffgroundinghuman-in-the-loop

Explanation

Strategy Follows Diagnosis

Once a failure is classified into its bucket, the recovery strategy follows directly:

FailureRecovery strategy
Transient 429/529/5xxRetry with exponential backoff + jitter
400/401 (bad payload or auth)Fix and resend -- retrying unchanged is pointless
Malformed structured outputDefensive parsing + reprompt/repair: validate, and on failure either retry, ask the model to fix its output, or fall back
Truncation (stop_reason: max_tokens)Raise max_tokens
Hallucinated contentGround and constrain: add sources, allow "I don't know," tighten instructions, and add an eval
Automated recovery can't guarantee correctnessGraceful degradation / human-in-the-loop: surface the failure instead of shipping a wrong answer

Why the Mapping Matters

Each strategy addresses a different root cause. Retrying a transient overload works because the failure is time-dependent; retrying an unchanged 400/401 request does nothing because the payload or credentials are still wrong. Applying the wrong strategy -- retrying a bad-request error, or fixing code for a hallucination -- burns effort without addressing the actual failure.

Common exam traps

  • Applying retry-with-backoff to 400/401 errors. These need a fix (corrected payload or credentials), not a retry -- the request will fail identically every time until it's changed.
  • Treating a hallucinated citation the same as a transient server error. Hallucination is a model-output problem addressed by grounding and constraining, not by backoff-and-retry.

Key Takeaways

  • Retry with exponential backoff + jitter for transient 429/529/5xx failures
  • Fix and resend for 400/401 -- retrying an unchanged request is pointless
  • Defensive parsing + reprompt/repair for malformed structured output; raise max_tokens for truncation
  • Ground and constrain for hallucinated content; escalate to graceful degradation/human-in-the-loop when automated recovery can't guarantee correctness
  • 429 needs backoff-and-retry, but 400/401 need a fix and hallucination needs grounding -- the strategies are not interchangeable

Glossary Terms

Related Concepts

PrepGenAICerts is an independent exam-prep site. It is not affiliated with, endorsed by, or sponsored by Anthropic, PBC. Claude and Anthropic are trademarks of Anthropic, PBC. Exam details are taken from publicly available Anthropic and Pearson documentation. About PrepGenAICerts.