A support agent forwarded me a ticket last month: a customer had been quoted a refund window that the company stopped offering two quarters ago. The answer came from the internal chatbot, phrased with complete confidence, and cited a document that still exists in the company wiki — in three versions.
The chatbot was not hallucinating. It retrieved a passage and read it. The passage was just from the wrong revision.
I could not fix that by asking nicely, so I measured it. This post is the measurement, a reproduction you can run in three commands with no dependencies, and the parts that surprised me.
I built a synthetic corpus of revised internal documents: 12 document types (refund policy, shipping fees, warranty, price list, penalty terms, settlement cycle, incident response, data retention, and four more), three revisions each, plus 24 unrelated chunks. That is 60 chunks. Embeddings came from multilingual-e5-small (ONNX int8, MIT licence), retrieval was cosine similarity, and the correct answer was defined as the current revision of that document.
Twenty-four questions arrived just after a revision landed. Thirty-six more arrived once every revision was indexed. Here is what happened:
| Condition | R@1 | R@5 | old revision ranked first |
|---|---|---|---|
| Baseline cosine, every revision kept | 50.0% | 97.2% | 47.2% |
| Baseline + delete old revisions | 11.1% | 91.7% | 0% (by definition) |
| Utility filter (ψ=40, h=16, ē=0.10, e₀=0.3) | 83.3% | 100% | 0% |
Three numbers deserve a second look.
47.2%. In almost half the questions, the top result was an outdated revision. During the weeks immediately after a revision it was 70.8%. The most dangerous moment is right after someone updates a document, which is also the moment everyone assumes the chatbot has been fixed.
11.1%. Deleting old revisions is the intuitive fix, and it is the worst option in the table. Questions asked in the old wording lose the only passage they matched. Customers do not read your new policy before asking; they ask with last year's quote, a bookmarked notice, or the phrasing a support agent used on the phone.
83.3%. Weighting instead of deleting gets both: current revisions rise, stale answers stop ranking first.
When a document is revised, teams pick one of three moves: delete the old version, keep it, or tag it "deprecated". Deleting is not reversible. Tagging does nothing unless the retriever reads the tag. Keeping it looks safe, but the three revisions are almost the same sentence — the retriever has no signal that tells them apart.
In my 60-chunk run, deleting old revisions left only 11.1% of questions with the current revision on top. The questions are written the way customers write them, and several still carry old terms; once the old revisions are gone, those questions fall to another document's current revision.
Two cheaper measures soften that loss. Keep the old wording as an alias on the new document, and rewrite the question into current terms before retrieval. Both are worth measuring on their own.
BRAG (arXiv 2611.31656, Apple, 2026-11-23) has a short idea: each chunk carries a Beta pair (e, n) — the probability that it gets used, and how many observations that estimate rests on. The ranking becomes a product instead of a similarity:
φ = exp(ψ · qᵀk) semantic fit
r = e / (1 − e) odds of being used
γ = r · φ rank
Retrieval now looks for the passage that is close and still in use.
When a label arrives — a user accepts the answer, a checker passes it, an agent corrects it — the pair updates with one Beta-Bernoulli step:
c.trials += 1
e = (c.prior * c.prior_k + c.hits) / (c.prior_k + c.trials)
r = e / (1 - e)
Two details matter more than the formula. Mix in a prior (I used 0.30) so e never sticks at 0 or 1, and decay stale evidence toward that prior with a half-life h, so a chunk that was popular six months ago does not stay first forever. No training, no GPU, no extra vector database. Two scalars per chunk, and scoring stays linear in corpus size.
The demo for this post is a single file with the standard library only: 6 document types × 3 revisions + 6 unrelated chunks = 24 chunks, 18 questions (12 in current wording, 6 in old wording).
python3 demo_rag_utility_en.py # three-mode comparison
python3 demo_rag_utility_en.py --sweep # parameter sensitivity
python3 demo_rag_utility_en.py --agent # tool-call trace, citations forced by code
Output on my machine (seed 7, ψ=4, h=12):
mode Recall@1 Recall@5 Doc@1 stale@1 ask legacy
plain 27.8% 94.4% 94.4% 66.7% 41.7% 0.0%
latest-only 88.9% 100.0% 88.9% 0.0% 91.7% 83.3%
utility 83.3% 100.0% 83.3% 0.0% 83.3% 83.3%
plain finds the right document 94.4% of the time and the right revision 27.8% of the time. That gap is the whole post: the retriever knows what the document is about, not which revision it is looking at.
The 18 questions are split on purpose. Twelve read like someone who has seen the new policy ("How many days do I have to request a refund?"). Six quote the old wording ("Is the 7-day refund rule still the same?"). They fail for different reasons, so a single accuracy number hides which one you need to fix.
Where do labels come from? The tool calls your agent already writes:
user : How much is shipping to the island?
-> tool_call : search(query='How much is shipping to the island?', mode='utility', k=3)
[1] shipping::v3 gamma= 25.657 (current) Standard shipping is $4.00 and free on ord...
[2] pricing::v3 gamma= 4.981 (unrelated) The Basic plan is $12.90 per month and you...
[3] refund::v3 gamma= 3.596 (unrelated) Online orders can be returned within 30 da...
<- tool_result : chunk_id=shipping::v3, gamma=25.657
-> answer : "Standard shipping is $4.00 and free on orders over $30." [source: shipping::v3]
The model picks the tool. The code forces the citation. Once every answer carries a chunk id, "not helpful" and agent corrections become labels for that chunk — you count a log you already keep instead of starting a labelling project.
1. The parameter is half the result. In the 60-chunk run, only 25% of 108 parameter combinations beat the baseline; the median was 13.9%. In the demo, raising ψ from 4 to 30 drops Recall@1 from 83.3% to 44.4% and brings the stale first place back to 50.0%. A paper's setting cannot be pasted into your index.
2. With few labels, adapting the query distribution hurts. The extension that also adapts query keys took the 60-chunk score from 83.3% to 61.1% and put stale answers back at 25.0%. With 24 labels, the keys overfit. Turn on the utility filter alone.
3. A small demo flatters deletion. In the 24-chunk version, deleting old revisions (88.9%) beats the utility filter (83.3%) — six small documents share so much wording that old-wording questions still land on the new text. On 12 document types the same fix collapsed to 11.1%. Do not choose a fix from a small demo; it shows you the symptom, not the trade-off.
4. With zero labels the method cannot be switched on. In a cold start it ranks exactly like the baseline. For the first week, filter to the latest revision and answer with a "needs confirmation" note. The utility filter ships together with the thing that collects labels, not before it.
The demo also misses three of its 18 questions, all refund questions landing on the trial or SLA policy, because lexical retrieval over 24 chunks is an exercise and not a benchmark. That is another reason the 60-chunk number is the one I quote.
The corpus is synthetic. Parameters were chosen and evaluated on the same data, so the 83.3% is optimistic. There is no held-out split, no customer documents, and no answer-quality metric — retrieval only, no generation calls. Throughput on Apple Silicon is unmeasured; all numbers come from a 2 vCPU Linux box with no GPU.
If you want the full version — the 60-chunk tables, chapter 10 on forcing citations, and a 30-question evaluation set you can fill in with your own documents — I put the English starter sample (19 pages, the demo, and the template) on Gumroad as a free download:
https://aiget.gumroad.com/l/rag-brag-english-starter
If you run an internal RAG chatbot, the first number worth having is what share of its answers come from an old revision. Measure that before you touch the ranking.