What does Spiritual Quotient, Prior Conditioning and RAG Agents conclude, in numbers, about “Retrieval Augmentation: One-Book Recall and Cross-Book Synthesis”?

Answer: Chapter 5 shows that synthesis questions spanning three volumes succeed only 0.060 of the time with direct retrieval in the top 40, while splitting the question first makes success depend on the accuracy of the split.

Scope of the numbers: Marked boxes separate evidence, 16 runnable Python programs, classical sources and hypotheses.

中文版

Data table

The numbers below are printed verbatim by the chapter's Python program and can be reproduced by running it. standard-library Python onlyprinted values that match the answer: 0.060, 40

question sigma k5 k=10 k=20 k=40
one book0.5 1.000 1.000 1.000 1.000
one book1.0 0.913 0.980 0.987 0.993
three0.5 0.000 0.007 0.013 0.060
three1.0 0.000 0.000 0.000 0.000
Reading: a question about one book finds its passage in a
short list. A question that needs three books at once is far
harder: all three must outrank thousands of passages, and
plain top-k retrieval misses them even at k40.
Show the full program
# Chapter 5. p09: Recall at k in an 82-volume library, one book or three.
# Each of 82 volumes has 40 passages. In a 24-dimensional embedding, a
# volume has a topic vector t, and its passages are 0.8 t + 0.6 u (u its
# own direction), normalised. A single-book question points at one
# passage plus noise of size sigma; a cross-book question points at the
# mean of three passages from three different volumes plus noise.
# Passages are ranked by cosine similarity. Over 150 questions of each
# kind (fixed seed) the program reports recall at k: the share of
# questions whose needed passage (or all three) are in the top k.
import math
import random

BOOKS, PER, DIM = 82, 40, 24

def unit(v):
    n = math.sqrt(sum(x * x for x in v))
    return [x / n for x in v]

def corpus(rng):
    out = []
    for b in range(BOOKS):
        t = unit([rng.gauss(0, 1) for _ in range(DIM)])
        for _ in range(PER):
            u = unit([rng.gauss(0, 1) for _ in range(DIM)])
            out.append((b, unit([0.8 * x + 0.6 * y for x, y in zip(t, u)])))
    return out

def ranks(cor, q):
    q = unit(q)
    sc = [sum(a * b for a, b in zip(v, q)) for _, v in cor]
    return sorted(range(len(cor)), key=lambda i: -sc[i])

def run(rng, cor, sigma, nneed, ks):
    hits = {k: 0 for k in ks}
    for _ in range(150):
        books = rng.sample(range(BOOKS), nneed)
        need = [b * PER + rng.randrange(PER) for b in books]
        q = [sum(cor[i][1][d] for i in need) / nneed +
             sigma * rng.gauss(0, 1) / math.sqrt(DIM) for d in range(DIM)]
        order = ranks(cor, q)
        pos = {i: r for r, i in enumerate(order)}
        worst = max(pos[i] for i in need)
        for k in ks:
            hits[k] += worst < k
    return {k: hits[k] / 150 for k in ks}

if __name__ == "__main__":
    rng = random.Random(76009)
    cor = corpus(rng)
    ks = (5, 10, 20, 40)
    print("   question   sigma  " + " ".join("{:>7s}".format(
        "k={}".format(k)) for k in ks))
    for nneed, name in ((1, "one book"), (3, "three")):
        for sigma in (0.5, 1.0):
            r = run(rng, cor, sigma, nneed, ks)
            print("   {:9s} {:6.1f}  ".format(name, sigma) + " ".join(
                "{:7.3f}".format(r[k]) for k in ks))
    print("\nReading: a question about one book finds its passage in a")
    print("short list. A question that needs three books at once is far")
    print("harder: all three must outrank thousands of passages, and")
    print("plain top-k retrieval misses them even at k = 40.")

Single source and citation

Fan, Y. (2026). Spiritual Quotient Quantification, Prior-Conditioned Generation and Retrieval-Augmented Cognitive Agents (Version 1.0.0), Chapter 5: Retrieval Augmentation: One-Book Recall and Cross-Book Synthesis. 5D Library. https://doi.org/10.5281/zenodo.24090203

DOI: 10.5281/zenodo.24090203 · Read the monograph · 5DL-B-076 · v1.0.0 · CC-BY-NC-ND-4.0

BibTeX
@book{fan2026076,
  author    = {Fan, Yafu},
  title     = {Spiritual Quotient Quantification, Prior-Conditioned Generation and Retrieval-Augmented Cognitive Agents},
  year      = {2026},
  publisher = {5D Library},
  edition   = {1.0.0},
  doi       = {10.5281/zenodo.24090203},
  url       = {https://doi.org/10.5281/zenodo.24090203}
}

Other chapter answers in this book