Experiment - Retry and fallback logic with jitter
Problem:You have an AI agent that calls an external API to get predictions. Sometimes the API fails or is slow. Currently, the agent tries once and fails if the API does not respond quickly or returns an error.
Current Metrics:Success rate: 70%, Average response time: 2.5 seconds, Failure rate due to API errors/timeouts: 30%
Issue:The agent fails too often because it does not retry or use fallback methods when the API is unavailable or slow.