Exercises

Solve 6 real-world guardrail, retry, and CI evaluation scenarios.

1. Why should fast Python regex/schema guardrails always run BEFORE LLMGuardrail?

2. A guardrail fails on a compliance violation that must abort immediately rather than retry. Which GuardrailAction should you set?

3. 50 concurrent workers hit a 429 rate limit and all retry at exactly t=2.0s, causing another outage. What RetryBackoffConfig field prevents this?

4. Why should you NEVER retry HTTP 401 Unauthorized or HTTP 400 Bad Request errors?

5. What does wrapping unit tests in with no_model_requests(): guarantee in CI?

6. A customer hits a brand-new hallucination bug in production. After fixing the prompt, what reliability habit prevents it from ever coming back?

Back to the Reliability tutorial