Editorial research note / Reliable local agents: grounding, retrieval and verified loops
Cache-augmented generation was not worth it here; moving the reranker was
- Question
- Would cache-augmented generation, pinning static text into a cached prompt prefix, serve a local agent's memory better than retrieval does?
- Result
- A first analysis recommended a small targeted hybrid, but on-machine benchmarks revised the verdict to not worth it. Pinning a static core was not free even with prefix caching: a warm cache hit still cost +431ms/prefill vs tiny (317→749ms) and ~445MiB KV. A small-corpus fast path targeted a reranker that was not on the live agent path, saving only ~94ms. Moving the reranker to the GPU did pay: rerank(20) 1446ms→~90ms (~16×), and warm recall went 1.8s→~150ms.
- Limits
- Against 6–15s agent turns all of this is <5%/below noise. The published evidence for the method was thin (1 paper, 8B model), and its "40x" gain was against in-context recomputation, not against real retrieval. One machine, one memory stack.
- Next question
- Which part of an agent turn dominates once retrieval costs are this small?
First verdict (working note)
Source & quoted measure
Verdict: don't replace RAG with CAG; adopt a small targeted CAG layer (nearly free here).
Revised verdict after benchmarking (working note)
Source & quoted measure
BENCHMARKED 2026-06-15 (verdict REVISED → not worth it;
Pinned prefix: added prefill time (working note)
Source & quoted measure
prefix caching does NOT make it free — warm cache HIT still +431ms/prefill vs tiny (317→749ms), compounds across multi-pass turns, ~445MiB KV;
Pinned prefix: cache memory (working note)
Source & quoted measure
prefix caching does NOT make it free — warm cache HIT still +431ms/prefill vs tiny (317→749ms), compounds across multi-pass turns, ~445MiB KV;
Fast path saving (working note)
Source & quoted measure
So fast-path saves only ~94ms (embed) on a path that runs ~once/plan.
Reranker moved to the GPU (working note)
Source & quoted measure
rerank(20) 1446ms→~90ms (~16×) and warm `recall()` (when >5 candidates) 1.8s→~150ms
Warm recall after the move (working note)
Source & quoted measure
rerank(20) 1446ms→~90ms (~16×) and warm `recall()` (when >5 candidates) 1.8s→~150ms
Share of an agent turn (working note)
Source & quoted measure
Against 6–15s agent turns all of this is <5%/below noise.
Evidence base for the method (working note)
Source & quoted measure
evidence base is thin (1 paper, 8B model); its "40x" is vs in-context recompute, NOT vs real RAG.
Published gain and its baseline (working note)
Source & quoted measure
evidence base is thin (1 paper, 8B model); its "40x" is vs in-context recompute, NOT vs real RAG.
Provenance
What the retained source says.
The guide above is editorial. The passages below are source quotations. A fingerprint identifies the retained source bytes; it does not establish the scientific claim by itself. Availability is stated for each source.
01 / Retrieval versus cache-augmented generation working note
Net: CAG pilots NOT worth implementing; the GPU-reranker one-liner IS done.