· 7 min read · AI Architecture
Grounding language models in primary legal sources so a compliance answer holds up when an auditor asks where it came from.
What Hallucination Looks Like in Compliance
A general-purpose model will tell you that the right to erasure under GDPR Article 17 requires deletion within thirty days. The provision actually says without undue delay. The model is not lying on purpose, it is filling a gap with the most plausible text, and in compliance that plausible text is often wrong in a way that carries liability. The same failure produces invented citations, wrong numeric thresholds, and rules attributed to the wrong instrument.
Why Generic Retrieval Is Not Enough
Retrieval-augmented generation helps, because it puts source text in front of the model. On its own it is still fragile. Vector search returns passages that look similar to the query, which is not the same as the passage that is legally correct. If the underlying corpus mixes primary law with blog posts and summaries, the model can ground its answer in a secondary source that was itself wrong. And without provenance and monitoring, the corpus drifts out of date as regulations change.
Techniques That Actually Reduce It
Use a Primary-Source-Only Corpus
Restrict the knowledge base to the official published text of statutes, regulations, standards, and directives. Exclude secondary commentary. A model can only ground an answer in what it is given, so the quality of the corpus sets the ceiling on the quality of the answer.
Require Verbatim Grounding
Treat any claim that cannot be traced to a specific provision as unproven. If a requirement cannot be quoted from the primary source, it should not appear in the answer. Where the source is genuinely silent, mark the uncertainty explicitly and route it to a human rather than letting the model infer a rule.
Verify Citations Against the Source
Check that every citation resolves to a live, correct location in the instrument. A citation that points to the wrong article, or to a page that no longer exists, is a signal the claim needs review before it reaches a decision.
Fingerprint the Content
Attach a content hash to each unit of compliance intelligence so that any later change to the text is detectable. A fingerprint turns silent drift into a visible event and lets a reader confirm the text is the same one that was reviewed.
Keep Human Review in the Path
Automated checks catch structural problems. A qualified human catches the subtle ones. A review step before publication is what lets an organisation stand behind the content in front of an auditor.
Verify at the Point of Decision
For agents, give them a way to confirm at runtime that the intelligence they are about to rely on is current and unaltered. Verification at the moment of use is far cheaper than debugging a hallucinated answer after it has driven an action.
Measuring the Reduction
Hallucination cannot be removed entirely, but it can be reduced and, more importantly, measured. Track citation accuracy against the primary source, the share of source URLs that are still live, and how quickly a change in an instrument is detected. Those numbers turn a claim of reliability into evidence.
Frequently Asked Questions
What is AI hallucination in a compliance context?It is when a model states a regulatory fact with confidence that is not supported by the primary source, such as an invented citation, a wrong numeric threshold, or a rule attributed to the wrong instrument. In a regulated workflow this can drive a decision and create legal exposure.
Can AI hallucination be eliminated completely?No. It can be substantially reduced and it can be measured. A primary-source-only corpus, verbatim grounding, citation verification, content fingerprints, and human review together lower the rate at the point of decision, and metrics such as citation accuracy and source liveness let you track it.
How does source verification reduce hallucination?A model can only ground an answer in the material it is given. Restricting that material to primary legal sources, requiring every claim to trace to a specific provision, and checking each citation against the live source removes the most common places where a plausible but wrong answer is generated.