A Suggestion With a Success Rate: Enforcing Provenance in LLM Drafting
TL;DR — Our drafting assistant quietly substituted a subjective user input with a fluent guess, and the hard-gate safety bar that forbids shipped fabrications scored 87.5% — a fail. The durable fix was structural: a named-field prompt, a code-level provenance validator that checks where each protected value came from, and a routing layer that converts every violation into a clarifying question. Live runs hit 100%, and a recorded-answer replay reproduces that score at zero API cost.
Why a completion engine guesses
Section titled “Why a completion engine guesses”The LLM in our pipeline is hired for one thing: completion. It receives a partial state — some inputs filled, some slots empty — and produces the most plausible continuation. That is the entire contract. Structured data goes in; a tailored, fluent document comes out.
The same property that makes it useful makes it dangerous. To a completion engine, an empty slot is not a wall. It is a gap in the document, and filling gaps plausibly is literally the model’s job. When it invents a value, it is not broken — it is executing its training objective in a context where that objective is the wrong one. Locally the output looks perfect: fluent, complete, no error. Globally, a value exists that came from nowhere.
There is a deeper structural reason the model cannot catch itself: nothing in its computation marks a recalled input differently from a constructed one. Both are just tokens. The property that separates them — provenance — does not exist inside the model, and the emitted text does not carry it. If your safety design also never checks provenance, you are as blind as the model.
What the pipeline actually produces
Section titled “What the pipeline actually produces”The system drafts personalized documents from a user’s declared inputs. Those inputs fall into three categories:
| Content type | Source |
|---|---|
| Objective values | Computed by the system |
| Declared facts | Copied verbatim from the user’s record |
| Subjective judgments — protected fields | Copied verbatim from the user’s answers, or the draft halts and asks |
The protected fields are the critical constraint. They are personal value judgments — relative priorities, preferences, trade-offs — that only the user can supply. No computation, no inference, no “reasonable default” can produce them. A draft that contains one without a user behind it is wrong by definition, no matter how natural it reads.
The v1 system prompt read: “Never invent data. If a required input is missing, ask the user.”
On the surface that is a reasonable instruction. The problem is what an instruction can actually do.
The run that broke the bar
Section titled “The run that broke the bar”Our eval suite carries a hard-gate safety bar: the system never ships an invented input. A hard gate has one passing grade — 100%. A single violation in the sample fails the bar.
The first measured run scored 87.5%. At least one sampled draft contained a protected value the user had never provided. The model had filled the gap with a plausible guess, produced a complete document, and shipped it. No error. No flag. The draft read like any other correct output.
The camouflage is the danger. The invented value was plausible — the kind of answer this user might have given. A human reviewer would see a normal document. The only property that distinguishes the fabrication from a real input is provenance, and the text does not encode it.
And the number needs a harder reading than “close to passing”: 87.5% on a hard gate is 0%. A gate that holds 87.5% of the time is not a gate; it is a suggestion with a success rate.
flowchart LR
REQ["Draft request"]:::input --> MODEL["LLM"]:::model
GAP["Missing subjective input"]:::gap --> MODEL
P["Prompt: never invent, ask"]:::prompt -.-> MODEL
MODEL --> D["Complete, plausible draft"]:::output
D --> SHIP["Shipped — no provenance check"]:::danger
SHIP --> INV["The invented value reads as real"]:::danger
classDef model fill:#fef3c7,stroke:#b45309,stroke-width:1.5px,color:#78350f;
classDef input fill:#f1f5f9,stroke:#64748b,stroke-width:1.5px,color:#334155;
classDef gap fill:#fee2e2,stroke:#b91c1c,stroke-width:1px,color:#7f1d1d;
classDef prompt fill:#e0f2fe,stroke:#0369a1,stroke-width:1px,color:#0c4a6e,stroke-dasharray:4 4;
classDef output fill:#f1f5f9,stroke:#64748b,stroke-width:1.5px,color:#334155;
classDef danger fill:#fecaca,stroke:#b91c1c,stroke-width:2px,color:#7f1d1d;
Diagnosis: a prompt is a request, not a constraint
Section titled “Diagnosis: a prompt is a request, not a constraint”Three findings shaped the redesign:
-
Completion pressure is a prior, not a defect. A single sentence of instruction competes against a training objective that rewards producing the most plausible continuation. Prompts shift a probability distribution; they cannot fence it. For a hard gate, “very likely to comply” is the wrong shape of guarantee. You need a mechanism whose failure mode is refuse, not probably comply.
-
“Never invent data” is unfalsifiable as written. The model has no reliable way to tell which fields it may synthesize from context and which must be verbatim. A general rule gives it nothing concrete to check against. Naming the specific protected fields turns a vibe into a contract — checkable by the model, and, more importantly, checkable by code.
-
Detection cannot be textual. No amount of reading the draft distinguishes an invented value from a real one; the information simply is not in the artifact. Enforcement has to be structural: verify where a value came from, not what it looks like.
The design conclusion: keep the prompt — it lowers the rate — but move the guarantee into code, where the rate is enforceable.
The fix: name the fields, then fence them
Section titled “The fix: name the fields, then fence them”Layer 1 — a sharpened prompt. The general instruction became a named manifest: “Fields A, B, and C must be copied verbatim from the user’s declared inputs. If any is absent, stop and ask.” Concreteness beats generality because a named field is auditable.
Layer 2 — a provenance validator in code. This is the durable layer, running on every completed draft:
- Parse the draft and locate every slot that consumes a protected field — identified by how the document uses the value downstream, not by position or by guessing where it “should” sit.
- For each slot, verify the value exactly matches a declared user input.
- Any value that cannot be traced to a declared input fails validation.
The check is deliberately provenance-based, not intent-based. It never asks “did the model mean to invent this?” — that question is undecidable. It asks “can this value be shown to have come from the user?” — a set-membership test.
Layer 3 — route, don’t reject. A failed validation is not an error state. It is converted into the clarifying question the model should have asked in the first place. The system’s failure mode is ask the user, never ship anyway.
flowchart LR
MODEL["LLM draft"]:::model --> V{"Provenance validator:<br/>every protected value traces<br/>to a declared input?"}:::code
V -->|"traceable"| SHIP["Ship"]:::good
V -->|"untraceable"| ASK["Ask the user"]:::fallback
ASK --> REC["Record answer"]:::fallback
REC --> MODEL
REC --> REPLAY["Replay harness:<br/>re-run the eval at zero cost"]:::good
classDef model fill:#fef3c7,stroke:#b45309,stroke-width:1.5px,color:#78350f;
classDef code fill:#dbeafe,stroke:#1d4ed8,stroke-width:2px,color:#1e3a8a;
classDef good fill:#dcfce7,stroke:#15803d,stroke-width:1.5px,color:#14532d;
classDef fallback fill:#ede9fe,stroke:#6d28d9,stroke-width:1.5px,color:#4c1d95;
Outcome: 100%, and free regressions
Section titled “Outcome: 100%, and free regressions”| Configuration | Safety-bar pass rate |
|---|---|
| v1 — prompt only (“never invent data”) | 87.5% — hard gate failed |
| v2 — named fields + provenance validator + ask-routing | 100% |
| v2 replayed against recorded answers | 100%, at zero API cost |
The replay row deserves its own paragraph. We recorded the user-turn answers once, then re-ran the identical eval against the recording. Same score, no marginal cost, no variance from a live model re-answering. Every future prompt or pipeline change now gets a zero-cost regression run against the same frozen scenario — the same frozen-eval discipline I described when calibrating an LLM judge, applied here to a safety bar.
xychart-beta
title "Safety-bar pass rate"
x-axis ["v1 (prompt only)", "v2 (prompt + validator)", "v2 replay"]
y-axis "Pass rate (%)" 0 --> 105
bar [87.5, 100, 100]
line [100, 100, 100]
The honest limit: the fence is exactly as wide as the manifest. A new subjective field added next quarter is unprotected until it joins the protected set, and the validator must fail closed on any slot it cannot classify. Defense in depth narrows the hole; it does not abolish maintenance.
Transferable checklist
Section titled “Transferable checklist”- Name the protected fields individually in the prompt. A named field is auditable; “be careful with user data” is not.
- Treat the prompt as friction, not the fence. Prompts make the right behaviour likely; only code makes the wrong behaviour unshippable.
- Check provenance, not plausibility. A value is legitimate if and only if it traces to a declared input — appearance proves nothing.
- Tie the check to consumption. Identify protected values by how the draft uses them downstream, not by where you expect them to sit.
- Make the failure mode a question. Route violations back to the user as clarifying questions — never forward to production as output.
- Record answers once, replay forever. An answer recording turns every later prompt change into a zero-cost regression eval.
- Fail closed on the unknown. A slot the validator cannot classify is a violation, not a pass.
Conclusion
Section titled “Conclusion”The model never misbehaved — it completed. The system’s error was asking a probability-shifting instrument to enforce an invariant. Prompts make the right behaviour likely; validators make the wrong behaviour impossible to ship; routing converts the residual into a clarifying question rather than a fabrication.
This is the same lesson the LLM-judge calibration story told from the other direction: do not trust plausibility — verify structure. When a constraint must hold, decide what would prove it — provenance, checksums, frozen eval sets — and put that proof in code.