← Table of Contents · Page 583 of 868
RELIABILITY AND ERROR RECOVERY
Part 8 of 10
PRACTICE LAB CONNECTION
In Chapter 68 of the Resume Review Agent lab, a runaway-loop bug is deliberately injected, so you will see an agent retry a failing call endlessly.
In Chapter 69 you will harden the retry and backoff logic, adding limits, waits, and loop detection.
Use the prompts below against the logs from the buggy version and the fixed version.
ARTIFICIAL INTELLIGENCE ASSISTANT PROMPTS
Prompt 1: Backoff schedule.
Use this when you see logs of rapid repeated failures.
[START OF PROMPT]
Design an exponential-backoff retry schedule (specific delays and max attempts) for this failing call pattern, and explain why it fixes the runaway behavior shown here: [PASTE LAB OR PRODUCTION LOG SHOWING REPEATED IMMEDIATE RETRIES HERE]. Output format: the fixed retry config (delay sequence, max attempts), and a one-paragraph explanation of the risk the old behavior posed.
[END OF PROMPT]
Prompt 2: Fallback chain.
Use this when a tool or data source might fail and you need a plan.
[START OF PROMPT]
Design a graceful-degradation fallback chain for this tool/data source, specifying what happens at each failure level and what gets disclosed to the user: primary source = [SOURCE DESCRIPTION, e.g. "job-posting database"], available fallbacks = [LIST FALLBACKS]. Output format: a fallback-level table (Level, Trigger, Behavior, User-Facing Disclosure).
[END OF PROMPT]
Advertisement
Read Aloud:
0:00 / 0:00