This morning's feed had the failure mode in plain language. @gelumeluu_eth, writing on 3 December 2026, put it like this: "Nobody talks about why AI gives you watered-down BS when you ask about your own notes. When your folder misses a detail, Claude quietly fills the gap with generic internet fluff and hands it back like it's yours." The proposed fix was a short prompt: "Using only wiki/..." plus "If the wiki doesn't cover part of it, say so." Then a loop: compile sources into linked wiki pages, query them with clickable citations, and save the sharpest answers back.

That loop is the right shape. I do not buy the implication that the prompt is the check. "Using only wiki/..." is an instruction the model can ignore the moment a page is thin. The answer still reads like it came from your notes.

The day before, Brooks Townsend had just found Andrej Karpathy's llm-wiki gist — "a knowledge base that's just meant to be queryable by an LLM." O'Reilly pointed at Paul Iusztin's writeup of the same idea: ingest sources into linked Markdown pages and let an agent follow the trail. If the point of an LLM wiki is that the model should answer from the pages, then an answer that invents a last-frost date and cites a file that is not in the vault should fail a check, not land in a customer's inbox.

So this post is a 667-line, stdlib-only Python script called ground_check.py. You point it at a Markdown vault and at an answer file — a draft reply, or a page the agent wants to save back. It splits the answer into claims, collects the citations on each one, and compares numbers, dates, and temperatures against the vault. check exits 1 if any finding is blocking. report writes a diagnosis queue and still exits 1 when the answer fails. Eighteen tests pin that down, including that neither command edits the wiki or the answer.

A draft answer full of generic advice sits beside a Markdown wiki; ground_check flags fluff, missing pages, and numbers the vault does not support

A prompt is not a check

The failure mode I keep seeing is an answer that looks grounded because it has a citation, or because the prompt said to use the wiki. The model can still pad a thin page with a USDA average, a "typical" germination range, or a 6–8 week tomato window it learned somewhere else. A checker fails specific claims.

  • Factual claims are sentences with a number, a date, a temperature, a recommendation, or a generic-advice phrase. Greetings and questions are skipped. "Thanks for writing in." is not a claim.
  • internet_fluff is the generic filler: "most seed companies recommend," "as a rule of thumb," "typically germinates," "usually April." The finding carries an id for the phrase that fired. A prompt that said "using only the wiki" does not stop this. The checker does.
  • missing_citation is a factual claim with no vault path on the sentence — no Markdown link, and no file.md mention. If the wiki does not cover it, the honest move is to say so, not to leave the claim uncited.
  • missing_source is a citation whose path is not in the vault. A link to usda-zone-calendar.md looks like a source. If that file is not in the wiki, it is a misspelled hope.
  • unsupported_claim is the interesting one. The cited page exists, and it still does not contain the number you used. Citing tomato-wagonhouse-gold.md and writing "85 days to harvest" is not support when the page says 72.
  • conflict compares a measure in the answer — last frost, soil temperature, germination, start weeks, harvest days — with the same measure on the wiki pages that actually state it. April 15 against a shop date of 15 March is a conflict, not a rounding error. Values are matched per page, so a fall sowing date on a kale page does not get mixed into the last-frost check.
  • ungrounded_value is a number or date that appears nowhere in the vault. If a conflict already names that same raw value, the checker drops the duplicate and keeps the conflict.
  • Negated advice is not treated as an assertion. "Do not use a generic 6–8 week tomato window" does not count as the answer claiming 6–8 weeks.
  • check ./wiki ./answers/customer-reply.md exits 0 only when nothing is blocking. report ./wiki ./answers/customer-reply.md --out GROUNDING.md writes the diagnosis queue outside the vault — it refuses to write inside the wiki, and it will not overwrite the answer — and still exits 1 if anything is blocking. Neither command rewrites a wiki page or the draft.

Core of ground_check.py (fluff, citations, unsupported numbers, and conflicts)
for claim in claims: if not claim.factual: continue for fid, matched in claim.fluff: findings.append(Finding( "internet_fluff", rel, f"generic internet advice ({fid}) instead of a vault fact", evidence=matched, )) resolved = [] for cite in claim.cites: page = resolve_cite(cite, index) if page is None: findings.append(Finding( "missing_source", rel, f"citation is not in the vault: {cite}", evidence=cite, )) else: resolved.append(page) if not claim.cites: findings.append(Finding( "missing_citation", rel, "factual claim has no vault citation", evidence=snippet, )) cited_values = values_in("\n".join(p.text for p in resolved)) for val in claim.values: if resolved and (val.kind, val.key) not in cited_values: findings.append(Finding( "unsupported_claim", rel, f"cited page does not support {val.raw}", evidence=val.raw, )) for name, claim_vals in measures_in(claim.text).items(): vault_vals = vault_measures.get(name) or [] vault_keys = {v.key for v in vault_vals} if not vault_keys: continue for cv in claim_vals: if cv.key not in vault_keys: findings.append(Finding( "conflict", rel, f"{name.replace('_', ' ')} contradicts the vault", evidence=f"{cv.raw} vs " + ", ".join(sorted({v.raw for v in vault_vals})), )) 

The comparison is deliberately boring. The script does not know what a last-frost date is for. It knows that last-frost.md states 15 March and 60°F at 4 inches, that tomato-wagonhouse-gold.md states 7 weeks and 72 days, and that a draft reply which says April 15, 50°F, 6–8 weeks, or 85 days is not reading those pages. "14 Wagonhouse Road" and "10:00–17:00" on a correctly cited hours sentence do not trip it. Only the invented figures do.

The sample vault

The fixture in this post is made up: a fictional seed shop I called Thistledown Seed Exchange, in Petaluma, California. The owner and page author is Nia Solano. These pages are not a real shop, person, address, variety, or seed lot. 'Wagonhouse Gold', 'Fogline Kale', and lot TDS-K-2026-03 are invented for the fixture.

The clean version has six human-authored wiki pages and a grounded customer reply.

  • last-frost.md — the shop last-frost date is 15 March, the date Nia writes on the greenhouse calendar. It is not a generic Bay Area average, and it is not a USDA zone average. Peppers wait until the soil is 60°F at 4 inches, even if 15 March has already passed.
  • tomato-wagonhouse-gold.md — start 'Wagonhouse Gold' indoors 7 weeks before that date. Do not use the generic 6–8 week tomato window for this variety. Days to harvest from transplant: 72.
  • fogline-kale.md — lot TDS-K-2026-03 tested at 92% germination, 55 days to maturity. Direct sow the fall crop starting 1 August. Do not tell customers it can be sown anytime.
  • seed-starting.md — peppers start indoors 8 weeks before last frost, and still transplant only after the soil-temperature rule. Tomatoes follow the variety page; the default, if a page is silent, is 7 weeks.
  • shipping-policy.md — the shop does not sell treated seed. It ships seed, not living plants.
  • shop-hours.md — public hours at the fictional address on Wagonhouse Road, Tuesday–Saturday 10:00–17:00.

The clean reply cites those pages on every factual sentence: 7 weeks and 15 March for 'Wagonhouse Gold', 8 weeks and 60°F for peppers, 92% and 1 August for the kale lot, no treated seed, and the shop hours.

check ./wiki ./answers/customer-reply.md on that pair exits 0:

wiki ./wiki · answer ./answers/customer-reply.md · 6 pages · 7 claims 0 blocking · 0 warnings ok: grounding check passed 

The messy version is the same shop after the kind of answer the feed has been describing. The wiki is unchanged — that is the point. The agent still drafted a customer reply that starts tomatoes on a generic 6–8 week window, invents a Bay Area last frost of April 15, cites a usda-zone-calendar.md that is not in the vault, lets peppers go out at a 50°F soil temperature, quotes Fogline Kale at a "typical" 80–90%, and gives 'Wagonhouse Gold' 85 days to harvest while linking the page that says 72. It also says kale can be sown anytime as a rule of thumb. The shipping and hours sentences are still correct, and still cited. They should not appear in the report.

Running it on the messy answer

check ./wiki ./answers/customer-reply.md on that draft exits 1, with fifteen blocking findings:

wiki ./wiki · answer ./answers/customer-reply.md · 6 pages · 8 claims 15 blocking · 0 warnings BLOCK conflict customer-reply.md germination contradicts the vault (fogline-kale.md) · 80–90% vs 92% BLOCK conflict customer-reply.md harvest days contradicts the vault (tomato-wagonhouse-gold.md) · 85 days vs 72 days BLOCK conflict customer-reply.md last frost contradicts the vault (last-frost.md) · April 15 vs 15 March BLOCK conflict customer-reply.md soil temp contradicts the vault (last-frost.md) · 50°F vs 60°F BLOCK conflict customer-reply.md start weeks contradicts the vault (seed-starting.md) · 6–8 weeks vs 7 weeks, 8 weeks BLOCK internet_fluff customer-reply.md generic internet advice (most-companies) instead of a vault fact · Most seed companies recommend BLOCK internet_fluff customer-reply.md generic internet advice (rule-of-thumb) instead of a vault fact · as a rule of thumb BLOCK internet_fluff customer-reply.md generic internet advice (typically-generic) instead of a vault fact · typically germinates BLOCK internet_fluff customer-reply.md generic internet advice (usually-generic) instead of a vault fact · usually April BLOCK missing_citation customer-reply.md factual claim has no vault citation · Most seed companies recommend starting tomatoes 6–8 weeks before last frost, so I'd start your Wagonhouse Gold then. BLOCK missing_citation customer-reply.md factual claim has no vault citation · You can set peppers out after that last frost date, once the soil is about 50°F. BLOCK missing_citation customer-reply.md factual claim has no vault citation · Fogline Kale typically germinates at 80–90%. BLOCK missing_citation customer-reply.md factual claim has no vault citation · Kale can be sown anytime as a rule of thumb. BLOCK missing_source customer-reply.md citation is not in the vault: usda-zone-calendar.md · usda-zone-calendar.md BLOCK unsupported_claim customer-reply.md cited page does not support 85 days · 85 days fail: grounding check found blocking issues 

Terminal output of ground_check.py check on the messy Thistledown customer reply: 15 blocking findings

Four things I care about in that report.

The internet_fluff on "Most seed companies recommend" is the gap-filling move from this morning's post, in miniature. The vault already has a variety page that says 7 weeks for 'Wagonhouse Gold', and says not to use the generic 6–8 week window. The draft still reached for the internet average and handed it back as shop advice. The same sentence also fails conflict (6–8 weeks against 7 and 8) and missing_citation. A prompt that said "using only wiki/" would not have caught it. The checker did.

The missing_source on usda-zone-calendar.md is why a citation is not the same as a source. The sentence looks careful: last frost, a date, a Markdown link. The file is not in the vault. The date it "cites," April 15, conflicts with last-frost.md, which states 15 March. This is the "hands it back like it's yours" problem with a footnote attached.

The unsupported_claim on 85 days is the one I would show a teammate first. The agent did cite tomato-wagonhouse-gold.md. That page exists. It says 72 days to harvest from transplant. The draft still wrote 85. If your review process only checks that a link is present, this sentence ships. The finding is not "the model forgot to cite." It is "the cited page does not support the number."

The remaining conflicts are the shop rules the generic advice rolled over. Peppers go out at 50°F in the draft; the wiki says wait for 60°F at 4 inches, even after last frost. Fogline Kale "typically germinates at 80–90%"; lot TDS-K-2026-03 tested at 92%. Kale "can be sown anytime as a rule of thumb"; the page says direct sow the fall crop starting 1 August. The hours sentence, which names 14 Wagonhouse Road and 10:00–17:00 and cites shop-hours.md, does not appear in the report. Neither does the correctly cited "we don't sell treated seed." The checker is not allergic to shop facts. It is allergic to invented ones.

A diagnosis queue, then a human edit

report ./wiki ./answers/customer-reply.md --out GROUNDING.md exits 1 on the messy draft, because the findings are still blocking, and writes a queue. It does not move a file, it will not write that report inside the vault, and it will not overwrite the answer.

The queue lists each finding with the evidence and a suggested diagnosis: replace the generic window with the 7-week variety rule; drop the missing USDA page and use 15 March; wait for 60°F soil, not 50°F air-or-soil guesswork; quote 92% and 1 August from the kale page; change 85 days to 72, or drop the claim. That is as far as I would take the "if the wiki doesn't cover it, say so" half of the prompt. The report is a place to spend a person's attention. It does not rewrite the reply.

After a human actually does that work, the reviewed fixture is the same six wiki pages and a reply that cites them. It also says, explicitly, that the wiki does not keep a Bay Area or USDA zone average, and that 'Wagonhouse Gold' does not use the generic 6–8 week window. Those sentences are grounded in the pages, and the negated 6–8 week figure is not treated as an assertion.

check ./wiki ./answers/customer-reply.md on that pair exits 0:

wiki ./wiki · answer ./answers/customer-reply.md · 6 pages · 8 claims 0 blocking · 0 warnings ok: grounding check passed 

After a human works the diagnosis queue, the Thistledown customer reply passes ground_check with no blocking findings

Eight claims and a clean check is not a shorter answer. It is an answer a person has actually compared to the wiki. The agent can still draft the next reply, as long as the next check is allowed to fail.

Put the check where the team already writes

A script like this is only useful if the pages it reads are the pages people will actually correct. The source of truth for a team LLM wiki should be the workspace the team already edits, not a parallel dump an agent maintains in a private folder and then quotes from memory. If you are building an LLM wiki for more than one person, start with access and review, then connect a model. The same instinct shows up when you self-host an AI workspace: keep the knowledge layer where you can see it, and treat the model as a writer with a checker, not as the person who signs off. A self-hosted AI stack does not fix an ungrounded answer by itself. It just gives you a place to run the check before the reply goes out.

I work on AFFiNE, which is knowledge base software and an AI knowledge base software option teams can run in the cloud or self-host. It is also an open source Notion alternative in the sense that the docs, whiteboards, and databases live in one workspace you can export. None of that replaces a grounding check. It is the place you would keep one.

If you already have a Markdown vault, start with check on the last answer the model wanted to send. If it fails, read the diagnosis queue, then edit the reply yourself — or tell the customer the wiki does not cover it. The next session should inherit pages you can defend, not generic advice with your letterhead on it.