Module 09 Activity
Scenario
The provider will rate limit you, time out on you, and go down. Decide now what happens.
What you build
A retry policy that classifies failures, backoff with jitter and a ceiling, a degradation ladder, and distinguishable error messages.
Steps
- Classify every failure mode as retryable or not, and say why.
- Implement exponential backoff with jitter and a hard retry ceiling.
- Handle a timeout as ambiguous: retry with an idempotency key rather than assuming failure.
- Build at least three rungs of the degradation ladder, including returning source text without a generated answer.
- Write five distinguishable error messages containing no internals.
- Give each one a request id the user can quote.
Evidence to hand in
- The classification with reasons.
- The backoff schedule with jitter and ceiling.
- The timeout handling with its key.
- Three degradation rungs.
- Five error messages.
Review checklist
- A 400 is not retried.
- Jitter is present and the ceiling is bounded.
- The timeout path retries with an idempotency key.
- The retrieval-only fallback exists.
- No message contains an exception, model name or prompt version.
