liveBook · Manning

Compound error

As explained in Designing AI Agents

A compound error is an overall failure produced when errors in successive agent roles or processing stages accumulate or cascade.

Compound error is an overall failure that arises as errors accumulate or propagate across successive steps. In an agent’s Perception-Reasoning-Action (PRA) loop, more autonomy can require more iterations, giving errors more opportunities to affect the result. section 2.1.2

Per-step accuracy and task success

If every step must succeed and each has a 95% chance of success, a 10-step task succeeds about 60% of the time: 0.95¹⁰ ≈ 0.60. At 20 steps, the rate falls to 36%. Raising per-step accuracy to 99% increases the 20-step rate to about 82%. section 2.1.2

Table 2.2 Compound error across PRA loop iterations
Step Accuracy
5 Steps
10 Steps
20 Steps
95% per step
77% overall
60% overall
36% overall
99% per step
95% overall
90% overall
82% overall

Compare overall success rates at different step counts and per-step accuracy levels. section 2.1.2

Design responses target the length, accuracy, and recovery behavior of the loop:

  • Reduce iterations by providing the right context upfront. Unnecessary cycles also consume tokens and time. section 2.1.2
  • Improve per-step accuracy through better prompts, tools, memory retrieval, and context preparation. section 2.1.2
  • Verify intermediate results through reflection so errors can be caught before they propagate. section 2.1.2
  • Fail fast when a result is clearly wrong; abort and re-plan rather than propagate corrupt state. section 2.1.2

How Designing AI Agents covers it

How deep it goes
Quantifies success rates across step counts and gives four engineering responses for reducing or containing errors.
Examples
Compares five-, ten-, and twenty-step tasks at 95% and 99% per-step accuracy.
What you can do after
Evaluate agent designs by whether they reduce iterations, improve accuracy, verify intermediate results, or detect failure sooner.
How it connects
Links the Perception-Reasoning-Action loop to reflection, memory retrieval, context preparation, and the circuit breaker pattern.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Designing AI Agents. The section links point to the parts of the book it draws on.