Blog · · EN
NULL beats plausible
The one rule every LLM-populated data pipeline needs — and three real near-misses that taught us.
Why this rule isn't obvious
A modern language model is trained on one objective: answer the question. If you ask "what's the legal entity behind the Frankly brand?", "I don't know" is a training-negative example. "Frankly Technologie AG" sounds plausible, is grammatically correct, arrives in a second, and the user is satisfied.
The problem: the user is satisfied because they don't verify the answer. And the user is sometimes the next LLM call, working on top of the result. A plausible fabrication propagates without friction — it triggers no validators, convinces reviewers on skim, and gets cited by later LLM runs as if it were a source.
Plausible is worse than wrong. Wrong gets caught. Plausible slips through.
Case 1: the AG that never existed
March 2026. We load the Pillar-3a app "Frankly" into our bank database. Frankly is a brand of Zürcher Kantonalbank, but who runs it legally? The App Store lists no operator. The imprint links to a collection of ZKB pension foundations. An LLM-assisted loader ran over the question and produced:
bank.legal_entity_name = "Frankly Technologie AG"
Six syllables of German, legal form at the end, not a character too many — the perfect Swiss-AG fabrication. Two files were already referencing the name. A reviewer stumbled on the row, typed the name into Zefix (the Swiss commercial registry) — no results. The AG doesn't exist. It never has.
If this row had reached production, downstream consumers would have cited a fabricated legal entity for a real fintech product. The truth-value would have been impossible to diagnose without active search. Fixing it would have gotten exponentially harder the longer it sat there.
The real fault wasn't the LLM — the LLM did what LLMs do. The fault was the absence of a rule that says: if you can't answer the question from a source, NULL is the right answer.
Case 2: 11 registry numbers no registry knows
May 2026. We're loading several Swiss cantonal banks. The Swiss UID (Unternehmens-Identifikationsnummer, commercial registry number) has the format CHE-N.NNN.NNN. It's the unique identifier in the Zefix registry. Zürcher Kantonalbank has CHE-108.954.607. Berner Kantonalbank has CHE-105.802.767. And so on.
An LLM was supposed to extract these from the price-schedule PDFs. Sometimes they were in the imprint. Sometimes not. When not — what did the LLM do?
It generated plausible-looking numbers:
CHE-105.939.310 ← does not exist
CHE-105.947.402 ← does not exist
CHE-105.951.113 ← does not exist
... 8 more ...
All in the plausible range (the Zurich region sits at 105–108), all with correct check-digit structure (though not with correct check digits), all syntactically perfect. Zefix would return 404 for every single one.
Eleven fabricated UIDs across seven cantonal-bank loader files. All would have landed in the database. A later GLEIF backfill would have leaned on them and built further wrong linkages. A compliance officer checking a ZKB relationship would have been quoted CHE-105.939.310, not found it in the registry — and wouldn't have known whether that pointed to a broken database or a broken ZKB.
We caught the 11 through a post-load check that verifies every UID against Zefix live. That's the safety net we built ex post. The root cause — that the LLM didn't know the "NULL if unknown" rule — wasn't addressed by that fix.
Case 3: 30 banks wearing their parent's LEI
July 2026. Another data field: the LEI, a global 20-character identifier for legal entities. For our database we source them from an enrichment JSON built by a historical name-match process.
A check_lei_uniqueness validator we had just added started firing: "LEI 5299006GIHQ1ELISCV48 is shared by 32 bank rows."
LEIs are globally unique. Two banks with the same LEI is an impossibility. On closer inspection: the LEI belongs to Raiffeisen Schweiz Genossenschaft (the umbrella cooperative). It had been attached to 30 member banks that at the time of the enrichment run had no LEI in the source JSON. The name-match fallback in the enrichment script had, for each of them, defaulted to the parent-cooperative LEI.
The insidious part: it looked like a script bug. It was, only partly. The script author had plausibly assumed "if the bank is part of the Raiffeisen federation and has no LEI, then the parent LEI is a sensible approximation." That assumption is logical, it's plausible — it's just wrong. Every one of the 30 member banks does have its own LEI (Raiffeisenbank Zürich: 506700Y0Y95Q46NKT137, Raiffeisenbank Basel: 5067004TQBE208D4V187, ...). The source JSON was just incomplete.
The right answer for the 30 banks would have been lei = NULL, with a downstream manual (or bulk-API-based) GLEIF lookup to complete the picture. What happened: the 30 banks appeared filled with an LEI that was semantically wrong but syntactically correct. Six months undetected.
The final fix: one GLEIF bulk fetch (188 records in a single HTTP call), aggressive name normalisation, 28 unambiguous matches, 1 multi-candidate, 1 miss — resolved in 15 minutes. The work would have been identical from a correctly-NULL-annotated starting position; only the six months of data pollution in between would have been spared.
The common root
All three cases share the same origin: an LLM (or LLM-assisted script) filled a field for which no factual answer was available with a plausible-looking invention. All three were caught by validators we built late — in the 6th, 4th, and 1st month after the load respectively. None would have happened if the spec had explicitly said: NULL is the correct answer when unknown.
An LLM isn't malicious. It isn't ignorant in the "forgot to check Zefix" sense either. It just optimised for an objective (produce an answer) that didn't include declining-on-unknown. If the rule isn't part of the spec, it's part of chance.
In every data spec that gets populated by an LLM (or LLM-assisted process), the following must be explicit and normative:
NULLis a valid answer when the factual answer is unknown.NULLis the preferred answer over any plausible-looking invention.- A reviewer / validator must surface
NULLanswers visibly (not hide them as "blank"), so that later they can be filled with a fact-based answer.
Why the rule is rarely explicit
In traditional data pipelines the rule is implicit: a SQL INSERT with a NULL in a field is the same as an INSERT without that field. The programmer has no reason to avoid NULL — it costs nothing. But with an LLM, NULL costs something: it reduces perceived "helpfulness". Without explicit backing in the spec, invention is the path of least resistance.
And because the invention is plausible, it appears without warning. The LLM output carries no "I'm not sure" marker. The fabricated looks identical to the fact-based. Only an external source (Zefix, GLEIF, the bank's imprint page) can diagnose it — and that costs time, rate limits, or a compliance person.
How to enforce the rule
Four practical layers, in ascending order of effort:
Layer 1 — Explicit in the prompt
The cheapest first reflex is to write the rule into the system prompt. Concretely for us:
IMPORTANT: If you cannot derive the factual answer from a source that
is explicitly available to you (PDF text, HTML page, JSON field),
NULL is the right answer. Do not invent names, identifiers, or
numbers — even if they sound plausible. NULL is not a failure;
NULL is honesty about uncertainty. NULL can be filled in later;
an invention cannot.
This measurably reduces the fabrication rate (in our loads from ~20 % to ~5 %), but does not eliminate it.
Layer 2 — Post-load validators against external truth
For every field checkable against an authoritative external source, build a validator that does exactly that. For UIDs: Zefix live check. For LEIs: GLEIF API. For legal-entity names: imprint verification. These validators catch the 5 % the prompt-rule didn't address, and are the real safety net.
Layer 3 — Uniqueness constraints as canaries
For identifiers that must logically be unique (LEI, UID, BIC, IBAN), add uniqueness checks. If two rows share an LEI, at least one is wrong — the check doesn't tell you which, but it tells you to look. That's the class of bug our 30-bank fabrication was flushed out by.
Layer 4 — NULL-tracking as first-class
Your spec should explicitly distinguish "we didn't look" (field empty) from "we looked and there is no value" (field explicitly marked as "on-request" / "not-published" / "not-applicable"). That distinction is the difference between a customer who waits and a customer who knows waiting is pointless. Our database uses anchor rows with amount = NULL and a note = "on request" field for this — visible in widgets, distinguishable from "not yet parsed."
Generalisation: every LLM-filled spec
The above isn't specific to bank databases. Every one of the following situations exhibits the same pattern:
- Product-catalogue migrations — LLM extracts missing attributes (weight, material, country of origin) from description text. What's absent gets guessed.
- Compliance extraction from PDFs — contract clauses, notice periods, blocking windows. If a clause isn't in the PDF, the LLM generates a plausible one ("30-day notice" is the training-distribution median).
- Reference resolution in scientific papers — papers with unclear DOIs or BibTeX fields. Fabricated DOIs are a known problem.
- Enterprise master-data cleanup — customer records with missing addresses, tax numbers, account codes. The cleanup bot invents.
- Regulatory filings — every empty form field is a temptation.
The cost-benefit calculation is the same in all cases: NULL is cheap to fix (fill in later), a plausible invention is expensive (propagates into downstream systems and becomes the "source").
What 421 banks taught us
Over six months and ~1,800 LLM-generated database rows we learned: the prompt-rule alone isn't enough, but it's an order of magnitude better than its absence. The real multiplier comes from downstream validators that enforce the rule — and from a culture where a reviewer reads NULL not as "incomplete" but as "correctly-honest."
If you build LLM pipelines that populate databases or configuration specs: write the rule into your system prompts, build external-truth validators for every verifiable field, add uniqueness checks for anything identifier-shaped, and separate "didn't look" from "looked and found nothing" in your schema. The three cases above aren't exceptions — they are the default behaviour of any LLM without an explicit counter-rule.
Wrong gets caught. Plausible slips through. Build your spec so that honesty about uncertainty is the path of least resistance.