Prompt caching cuts consistency-based hallucination detection from 6x to ~1.5x cost, measured across 6 models
Own-Establishment293 · reddit · 2026-08-21
The standard objection to black-box consistency sampling for hallucination detection (sample the same prompt N times, check for contradictions) is cost. The author measured it across 6 models / 4 providers with a 21k-token context: since consistency sampling resends byte-identical prompts — the best case for prefix caching — six samples cost only 1.55–2.52x a single call instead of 6x.
The writeup derives a closed-form cost model: M = N − f(N − w − (N−1)c) with f = C/(C+Q+kO), linear in cache coverage. It reproduces all six measured models to within 0.005 and inverts to return the context size that clears a given cost ceiling.
Two honest negative results: Qwen and Llama on Together stayed at 6x because there's no published cached price (Llama cached 99.4% of the prompt and saved $0 — a cache hit is not a discount), and Gemini cached nothing below 7k tokens. This is a long-context result; short prompts with long answers are unaffected.
The scoring works: on a question the source policy doesn't answer, one model alternated No-Yes across six samples (noncontradiction 0.40) and another cited nonexistent regulations; on directly answered questions all models scored 0.99+. Code and raw JSON are open-sourced under MIT (github.com/mohitcek/r2c2).
More from Models
- World model demo: Unitree B2/H1 robots navigate generated world with intact spatial memory — Scobleizer · 2026-11-30
- Business-prose model open-sourced: trained on a single 96GB GPU, all quant formats in one repo — IridiumEagle · 2026-11-30
- Trap 2: 36% of training pairs silently taught the model to fabricate quotes — IridiumEagle · 2026-11-30
- Trap 3: benchmarking a rewriter at temperature=0 triples measured slop — IridiumEagle · 2026-11-30
- Before/after: the open-source rewriter strips AI slop while keeping every number intact — IridiumEagle · 2026-11-30
- ambient_xyz open-sources a fine-tune that cuts LLM slop by 91% — IridiumEagle · 2026-11-30