What does RAG and Multi-Agent Reliability conclude, in numbers, about “Multi-Agent Pipelines: Error Cascades and the Verifier-Gated Absorbing Markov Chain”?
Answer: Chapter 4 confirms that 0.92 to the tenth power is 0.4344, shows that three-way voting helps only while errors are independent, and writes verifier gating as an absorbing Markov chain: a deterministic, independent check lifts a ten-step chain to 0.9949 for only 10.84 attempts.
Scope of the numbers: All data are synthetic, generated by the book's programs; the numbers show mechanisms and orders of magnitude and are not measurements of any product.
Data table
The numbers below are printed verbatim by the chapter's Python program and can be reproduced by running it. printed values that match the answer: 0.4344, 0.9949, 10.84
verifier s f n success escalated attempts none 0.00 0.00 1 0.4344 0.0000 10.00 code check 1.00 0.00 3 0.9949 0.0051 10.84 code check 1.00 0.00 10 1.0000 0.0000 10.87 good judge 0.80 0.05 3 0.8231 0.0132 11.15 weak judge 0.50 0.10 3 0.6097 0.0228 11.38 strict judge 0.80 0.30 3 0.5239 0.3303 12.23 largest gap, closed form vs fundamental matrix: 7.1e-15 exact checker, n = 3: escalation per step 0.08^3 = 5.12e-04 Reading: an exact, independent checker turns 43 % into better than 99 % for under 11 attempts over ten steps: errors are caught and retried instead of propagated, and the residual risk falls geometrically with each allowed retry. A judge that misses a fifth of errors keeps silent failures in the chain; one that rejects too much spends attempts and escalates.
Key formula
Show the full program
# Chapter 4. p09: A verifier in the loop as an absorbing Markov chain.
# L = 10 steps, each attempt right with p = 0.92. After every attempt a
# verifier passes or rejects it: it catches a wrong attempt with
# sensitivity s and wrongly rejects a right one with false-alarm rate f.
# A rejected attempt is retried, up to n attempts per step; if all n are
# rejected the run stops and is escalated to a person. A wrong attempt
# that passes is a silent failure: the run goes on, but its result is
# wrong. Per attempt:
# accept right a = p (1 - f), accept wrong b = (1 - p)(1 - s),
# retry r = p f + (1 - p) s, G = (1 - r^n) / (1 - r).
# Closed form: success (a G)^L, escalation 1 - (1 - r^n)^L, expected
# attempts sum_i (1 - r^n)^i G. The same numbers are recomputed from the
# fundamental matrix N = (I - Q)^(-1) of the absorbing chain whose
# transient states are (step, attempt, already wrong?).
L, P = 10, 0.92
def closed(s, f, n):
a, r = P * (1 - f), P * f + (1 - P) * s
g = (1 - r ** n) / (1 - r) if r < 1 else n
esc = r ** n
return ((a * g) ** L, 1 - (1 - esc) ** L,
sum((1 - esc) ** i * g for i in range(L)))
def fundamental(s, f, n):
a, b = P * (1 - f), (1 - P) * (1 - s)
r = P * f + (1 - P) * s
states = [(i, j, t) for i in range(L) for j in range(n) for t in (0, 1)]
ix = {st: k for k, st in enumerate(states)}
m = len(states)
q = [[0.0] * m for _ in range(m)]
win = [0.0] * m
for (i, j, t), k in ix.items():
if j + 1 < n:
q[k][ix[(i, j + 1, t)]] += r
if i + 1 < L:
q[k][ix[(i + 1, 0, t)]] += a
q[k][ix[(i + 1, 0, 1)]] += b
elif t == 0:
win[k] += a
def solve(rhs):
mat = [[(1.0 if x == y else 0.0) - q[x][y] for y in range(m)]
+ [rhs[x]] for x in range(m)]
for c in range(m):
piv = max(range(c, m), key=lambda z: abs(mat[z][c]))
mat[c], mat[piv] = mat[piv], mat[c]
for z in range(m):
if z != c and mat[z][c]:
fct = mat[z][c] / mat[c][c]
mat[z] = [u - fct * v for u, v in zip(mat[z], mat[c])]
return [mat[z][m] / mat[z][z] for z in range(m)]
start = ix[(0, 0, 0)]
return solve(win)[start], solve([1.0] * m)[start]
if __name__ == "__main__":
print(" verifier s f n success escalated"
" attempts")
cases = (("none", 0.0, 0.0, 1), ("code check", 1.0, 0.0, 3),
("code check", 1.0, 0.0, 10), ("good judge", 0.8, 0.05, 3),
("weak judge", 0.5, 0.10, 3), ("strict judge", 0.8, 0.30, 3))
worst = 0.0
for name, s, f, n in cases:
succ, esc, tot = closed(s, f, n)
fs, ft = fundamental(s, f, n)
worst = max(worst, abs(fs - succ), abs(ft - tot))
print(" {:<15} {:4.2f} {:4.2f} {:3d} {:.4f} {:.4f}"
" {:6.2f}".format(name, s, f, n, succ, esc, tot))
print(" largest gap, closed form vs fundamental matrix: {:.1e}"
.format(worst))
print(" exact checker, n = 3: escalation per step 0.08^3 = {:.2e}"
.format(0.08 ** 3))
print("\nReading: an exact, independent checker turns 43 % into")
print("better than 99 % for under 11 attempts over ten steps: errors are")
print("caught and retried instead of propagated, and the residual")
print("risk falls geometrically with each allowed retry. A judge that")
print("misses a fifth of errors keeps silent failures in the chain;")
print("one that rejects too much spends attempts and escalates.")Single source and citation
Fan, Y. (2026). Retrieval-Augmented Generation Geometry, Reciprocal Rank Fusion and Multi-Agent Error Cascades (Version 1.0.0), Chapter 4: Multi-Agent Pipelines: Error Cascades and the Verifier-Gated Absorbing Markov Chain. 5D Library. https://doi.org/10.5281/zenodo.24090170
DOI: 10.5281/zenodo.24090170 · Read the monograph · 5DL-B-061 · v1.0.0 · CC-BY-NC-ND-4.0
BibTeX
@book{fan2026061,
author = {Fan, Yafu},
title = {Retrieval-Augmented Generation Geometry, Reciprocal Rank Fusion and Multi-Agent Error Cascades},
year = {2026},
publisher = {5D Library},
edition = {1.0.0},
doi = {10.5281/zenodo.24090170},
url = {https://doi.org/10.5281/zenodo.24090170}
}Other chapter answers in this book
- Chapter 1 · High-Dimensional Geometry: Concentration of Measure, Effective Dimension and Hub Chunks
- Chapter 2 · Lexical and Dense Retrieval: Their Blind Spots and the Smoothing Constant of Reciprocal Rank Fusion
- Chapter 3 · The Context Window: Position Decay, Evidence Dilution and the Best Number of Chunks
- Chapter 5 · Verifier Independence and the Cost of Retries
- Chapter 6 · The Statistics of Evaluation Itself: Sample Size, Judge Bias and the Winner's Curse
- Chapter 7 · The Routing of the *Qilue* and Han Fei's *Canyan*: Two Ancient Methods of Retrieval and Verification
- Chapter 8 · A Five-Step Check and a Pre-Registered Offline Evaluation