我做了一个工具,让 AI 去引用来源,而不是凭记忆作答。然后我把整件事赖以成立的那一条假设拿去做压力测试——结果把我送去做了别的东西。
我做了一个工具,让 AI 去引用来源,而不是凭记忆作答。然后我把整件事赖以成立的那一条假设拿去做压力测试——结果把我送去做了别的东西。
前段时间我做了个小工具,叫 klode。它背后的想法既老派又诱人:别让 AI 凭一段模糊的记忆回答问题。让它用到的每一条主张都指向真实来源里原样的一句话,再跑一个 linter,只要有任何一处引用对不上,立刻报错。这样就没有东西能悄悄漂移或者编造幻觉,因为没有收据就不许开口。我给它定的口号只有三个词:引用,不要回忆。
I built a tool to make an AI cite its sources instead of recalling them. Then I stress-tested the one assumption the whole thing rests on — and the result sent me to build something else.
A while back I built a small tool called klode. The idea behind it is old and appealing: don't let an AI answer from fuzzy memory. Make every claim it uses point at a verbatim line in a real source, and run a linter that breaks the moment any citation stops resolving. Nothing can quietly drift or hallucinate, because nothing gets to speak without a receipt. The motto I built it around was three words: cite, don't recall.
The obvious next move was to feed it greatness. I had two shelves ready — the canon of software engineering, the canon of research methodology — and the plan was to encode them into klode and end up with an expert I could consult: a thing that answered every design or methods question with a cited principle instead of a confident guess.
Before I built that library, I did the step I most wanted to skip — I checked whether the premise klode rests on was even true in this case. It mostly wasn't. This is what the test found, and why the finding is worth more than the library would have been.
It's the product of an adversarial process rather than one confident voice. I wrote the plan down, handed it to a second, independent model, and told it to destroy the idea rather than improve it. Then I put klode's central bet through three rounds of falsification. Where the evidence won, my own tool lost the argument — and that loss is the useful part.
The reframe: grounding only helps where the model is ignorant#
Start from what grounding — klode's entire reason to exist — actually buys you. The pitch is that a citation stops the model from inventing things: it has to point at a real sentence in a real source. That part is true. But it smuggles in a second claim nobody says out loud: that the source contains something the model's memory lacks. Grounding can only improve an answer if the cited passage adds knowledge the model didn't already have.
Now ask whether that holds for a frontier model and a canonical book. These models didn't skim the classics. They absorbed them — the arguments, the vocabulary, the worked examples, the counterarguments. Pointing klode at a famous passage from a famous book and asking the model to reason "from the source" is like handing a fluent speaker a dictionary before every sentence. The dictionary is real. It is also redundant.
That's a claim about the world, and claims about the world are cheap to test now. So instead of defending my own tool with an argument, I tried to break it with an experiment.
The design is simple enough to run in an afternoon. Take judgment questions with known-correct answers. Give the same questions to the same model under three conditions, each blind to the others:
Generic — no source at all. The model uses only what it already knows.
Grounded — the same questions, plus real, verbatim passages from the authoritative source, checked to exist in the book. This is klode doing its job.
Control — the same questions, plus real passages that genuinely come from an authoritative text but are irrelevant to the question.
The logic is a squeeze. If grounding works, condition 2 has to beat both — better than knowing nothing, and better than being handed the wrong quote. If the real passages don't move the score, the citation was decoration.
Before running it I did one more thing worth recommending on its own: I gave the whole plan to that independent model and told it to demolish the idea. Its sharpest blow landed on the thing klode is proudest of. A verified citation, it pointed out, proves only that the quote is real. It says nothing about whether the judgment wrapped around the quote is correct. You can attach a flawless citation to a wrong conclusion. klode gives you provenance, not proof. That critique reframed the whole test — and it turned out to be exactly right.
Round one — the software design canon. Six pairs of small designs, each with a clearly better and clearly worse version by the book's own principles: deep modules, information leakage, pass-through methods, the works. Real passages from the source in condition 2; irrelevant real passages in condition 3.
Every condition scored six out of six. Identical. The model with nothing in front of it reached the same verdicts, with the same specific reasoning, as the model handed the verbatim principles. If anything the empty-handed condition was slightly sharper — it caught a real bug the question hadn't even asked about.
Round two — harder, and specialized. Maybe the design questions were too easy. So I moved to research methodology, where the traps are subtler: collider bias, over-adjustment, the difference between grounded theory and forcing data into a framework, why "the themes emerged" is a tell, why a small significant study overstates its own effect. The items were drawn from standard texts in each area — Morgan and Winship on causal inference, Charmaz on grounded theory, Braun and Clarke on thematic analysis, Rosenbaum on observation and experiment, and Ritchie's Science Fictions on research integrity. Seven items, deliberately worded to lure the wrong answer, including two that were correct-but-looked-wrong to catch a model that flags everything.
Seven out of seven. In all three conditions. Again the real passages changed nothing; again the irrelevant ones did no harm. The model named "Berkson's bias" and "winner's curse" with no book in front of it, and it declined both traps.
At this point the honest worry is a ceiling. Maybe my test simply couldn't detect a difference — maybe any set of questions would come out flat. A null result means nothing unless the same instrument can register a hit.
Round three — the positive control. So I invented a small software framework the model could not possibly know: a fake key-value store with deliberately counterintuitive rules. "Strict mode" silently ignores overwrites instead of erroring. Opening a second transaction commits the first instead of nesting. The commit call returns the number of evicted keys, not written ones. Every rule was arbitrary but internally consistent, and every correct answer contradicted normal intuition — so a model guessing from experience would be led wrong. Condition 2 got the real spec; condition 3 got an equally novel but unrelated one.
The scores came apart:
Round
What the knowledge is
No source
Real source
Wrong source
1 — software design
canonical, already in the model
6 / 6
6 / 6
6 / 6
2 — research methods
specialized but published
7 / 7
7 / 7
7 / 7
3 — invented framework
knowledge the model can't have
2 / 7
7 / 7
3 / 7
There it is. When the answer genuinely lived only in the document, grounding was the entire difference between failing and acing the test — and handing over the wrong document was no better than handing over nothing. The instrument works. It registered a hit the instant there was one to register. Which means the two flat rounds were real flatlines, not a broken gauge.
Grounding improves a model's judgment only where the model is ignorant. For knowledge it already holds, the citation is decoration; for knowledge it lacks, the citation is everything.
Say it back to the original plan and the plan dissolves. Both my shelves — the software canon, the methodology canon — are precisely the material a frontier model has already internalized. Encoding them into klode would have produced, at considerable effort, a more auditable way to get answers the model would already give me for free.
The test didn't kill the tool. It relocated it — and told me, more precisely than any roadmap, the one job it's good at.
klode is the wrong instrument for teaching a frontier model the classics; the model is already fluent in them. It's the right instrument for exactly the knowledge the model can't have:
Knowledge that's private. My own accumulated standards, my past decisions, an internal playbook, a client's undocumented system, my personal style rules. None of it is in any training set. This is the region where round three lives.
Knowledge that's too new. Anything past the model's training cutoff — this quarter's paper, a framework released last month.
Knowledge that's genuinely obscure. The long tail the model saw too rarely to have learned.
And two reasons to reach for klode that have nothing to do with making the model smarter — reasons the test wasn't even measuring:
Provenance. A citation someone else can check is worth having even when it doesn't change the answer. That's the line between advice and an auditable claim — and it's the actual core of what I built. The receipt, not the IQ.
Constraint. Sometimes you don't want the model's averaged, eclectic judgment; you want it pinned to one specific tradition. Grounding is how you hold it there.
None of this is new. That retrieval helps most for the long-tail facts a model saw rarely in training — and barely at all for the popular ones it already knows — is one of the more replicated results in the field, running from the original retrieval-augmented work (Lewis et al., NeurIPS 2020) through the popularity studies that pinned it down (Mallen et al., ACL 2023; Kandpal et al., ICML 2023). And it hasn't aged out. In 2024, retrieval still beat fine-tuning by a wide margin precisely for the least-popular knowledge (Soudani et al., SIGIR-AP 2024); and 2026 work finds the popularity gap is strongest in the largest models, shaped by what was in pretraining rather than by real-world prominence (Mozafari et al., SIGIR 2026) — the direct answer to anyone hoping a frontier model has simply outgrown the effect. It hasn't. If anything the newer worry cuts the other way: a retrieved passage can suppress a model's own correct knowledge when the two conflict — "contextual interference" (Lin et al., ICLR 2026), a sharper cousin of what my control round bumped into. I didn't learn something the field didn't know. I learned it about my own tool, in an afternoon, before pointing it at the wrong shelf.
The cheap experiment beats the confident argument#
The habit is the part worth keeping. When building was expensive, you reasoned carefully about what to build, because building the wrong thing hurt. Now building is cheap and the expensive skill has moved upstream — to deciding what not to build. The temptation is to settle that by argument, to persuade yourself with a good story about citations and trust that the library is obviously worth it. With your own tool as the hero of the story, the temptation is stronger, not weaker.
I could have written that story convincingly. Instead I tried to prove my tool's core bet worthless, invited a rival to help, and let three small experiments overrule the pitch. The bet mostly failed for the canon — and I'm better off for it. klode is more useful to me now that I know the one thing it's actually good at than it would have been wrapped around a library I didn't need.
Test the premise before you build on it. Especially when the premise is yours.