A hallucination is a fluent, confident statement that is not supported by any source the model was given or reliably learned. It happens because a language model is trained to produce probable continuations, not verified ones — nothing in the objective distinguishes a true statement from a plausible one. Retrieval-augmented generation reduces it substantially by supplying source passages at answer time, but retrieval does not eliminate it: a model can still ignore, misread or over-extend the passages it was handed.
Hallucination is a system property, not a model defect to be prompt-engineered away. The controls that matter are grounding, citation enforcement, abstention and human escalation.
What problem does this solve?
A government entity deploys an Arabic-language assistant over its published service catalogue. A citizen asks about the documents required for a licence renewal. The assistant lists five documents fluently and correctly formatted. Four are right. The fifth was never required.
Nobody notices for weeks, because the answer looks exactly like the four correct ones. There is no hedging, no uncertainty marker, no citation. The failure is invisible precisely because the output is well-formed.
The same mechanism causes invented regulation numbers, plausible but non-existent case references, and confident answers about policies that changed last quarter. In a citizen-facing service, each of these is a governance incident rather than a quality issue.
How the solution works
Ground the answer. Retrieve passages from an authoritative corpus and instruct the model to answer only from them. This converts an open-ended generation problem into a reading-comprehension problem, which models do far better.
Enforce citation. Require every factual claim to carry a reference to a retrieved passage, and reject or flag answers that do not. An uncited claim in a grounded system is a hallucination by definition.
Permit abstention. A model that cannot say 'this is not covered in the documents I have' will invent something instead. Abstention has to be an explicitly rewarded behaviour, not an accident.
Escalate. For high-consequence categories, route to a human rather than answering. The decision about which categories those are belongs to the service owner, not the engineering team.
- 1The objective rewards plausibility Next-token prediction optimises for likely continuations. A fabricated regulation number is highly likely in context; nothing in training penalises it for being false.
- 2Parametric memory is lossy Facts absorbed during pretraining are stored as distributed weights, not as records. Recall degrades and blends related facts together.
- 3Retrieval supplies evidence RAG places authoritative passages in context at answer time, shifting the task from recall to comprehension.
- 4Retrieval can still fail If the retrieved passages are irrelevant, incomplete or contradictory, a model instructed to answer will often answer anyway.
- 5Verification closes the loop A separate check — entailment scoring or citation validation — tests whether the answer is actually supported by the passages retrieved.
Reference architecture
Hallucination is reduced at four independent points. A system with only one of them will still produce confident fabrications.
| Layer | What it contains |
|---|---|
| Corpus layer | Authoritative, current, deduplicated documents with clear ownership. A stale corpus produces confidently wrong grounded answers. |
| Retrieval layer | Chunking, embedding and ranking that actually surface the right passage for the question asked. |
| Generation layer | Instructions constraining the model to the passages, plus an explicit abstention token. |
| Verification layer | Citation validation or entailment checking before the answer is displayed, with routing when it fails. |
Deployment options: For government and regulated data, the corpus and often the model itself must stay inside the entity's boundary, which constrains model choice to what can be self-hosted and shifts the evaluation burden onto the deploying team.
Key capabilities
Grounding and citation enforcement
Answers that cannot reach the user without a traceable source for every factual claim.
availableAbstention and escalation policy
A defined set of categories the assistant refuses to answer and routes to a person instead.
availableArabic retrieval evaluation
Retrieval quality measured on Arabic queries specifically, including dialect and orthographic variation.
custom developmentFaithfulness monitoring
Sampled production answers scored for support against their cited passages on a continuing basis.
custom developmentIntegrations
The controls span the document platform, the retrieval service and the case-management system that receives escalations.
| System | Integration point & data exchanged | Direction |
|---|---|---|
| Document management | Corpus freshness and ownership tracked so a superseded circular is withdrawn from retrieval. → Document Management & Correspondence System | bi-directional |
| Vector store | Chunking and embedding versioned; re-embedding on model change prevents silent representation drift. | bi-directional |
| Case management | Abstentions and failed verifications become tickets rather than dead ends for the citizen. | bi-directional |
Industry use cases
Government service assistants
Requirements, fees and timelines answered from the published catalogue, with escalation where the corpus is silent.
Legal and compliance research
Retrieval over regulations where an invented clause reference is a serious professional risk.
Internal HR and policy support
Lower consequence, but a wrong leave-entitlement answer still creates a dispute with a record attached.
Customer support deflection
Product answers grounded in current documentation rather than the version the model saw in pretraining.
UAE & GCC considerations
Arabic raises the difficulty on the retrieval side rather than the generation side. Diacritics may be present or absent, hamza and alef forms vary between documents, Modern Standard Arabic in official circulars differs from the dialect a citizen types, and mixed Arabic-English technical terms are common. Retrieval quality must be measured on real Arabic queries rather than on translated English ones, and the abstention path matters more where the corpus itself is only partly translated. Where residency rules require self-hosting, model choice narrows and evaluation becomes the deploying entity's responsibility.
Implementation approach
- 1Establish the corpus Confirm authority, currency, ownership and coverage before building anything. Most grounded-answer failures start here.
- 2Measure retrieval separately Evaluate recall@k on real questions before judging the generator. A generation problem is often a retrieval problem.
- 3Constrain and require citation Instruct answering from passages only, and make every factual sentence carry a reference.
- 4Define abstention Agree with the service owner which categories the assistant must refuse, and what the citizen sees instead.
- 5Verify before display Validate citations, and route failures to a human rather than showing an unverified answer.
Security & deployment
Retrieval must respect the asker's permissions: a grounded assistant that retrieves from documents the user is not entitled to see becomes an access-control bypass with a friendly interface. Enforce document-level authorisation at retrieval time rather than filtering afterwards. Log the passages used for each answer so a disputed response can be reconstructed. Treat prompt injection embedded in retrieved documents as a live threat, since a corpus that accepts user-submitted content can carry instructions to the model.
A worked example
The same question through three configurations, showing where the control actually bites.
- No retrieval. The model answers from parametric memory. It produces five requirements, one invented, with no way for the reader to check any of them.
- Retrieval, no citation requirement. Three relevant passages are retrieved. The model uses them but adds a sixth requirement from memory, blended seamlessly into the list.
- Retrieval plus enforced citation. Every item must carry a passage reference. The invented requirement has no source to cite, so it is dropped or flagged before display.
- Retrieval, citation and abstention. The corpus does not cover renewals for one licence category. The assistant says so and offers escalation rather than filling the gap.
Retrieval alone removed some of the problem. Citation enforcement removed the specific failure. Abstention handled the case where the honest answer was that the corpus does not cover it — which retrieval by itself will never produce.
In code
Grounding is a prompt-and-verification contract, not a single setting. This shows the structure: retrieve, constrain, then verify that every claim is supported.
import re
SYSTEM = (
"Answer ONLY from the numbered passages provided. "
"Every factual sentence must end with a citation like [2]. "
"If the passages do not contain the answer, reply exactly: "
"INSUFFICIENT_CONTEXT. Do not use outside knowledge."
)
def build_prompt(question, passages):
body = "\n".join(f"[{i}] {p}" for i, p in enumerate(passages, start=1))
return f"{SYSTEM}\n\nPASSAGES:\n{body}\n\nQUESTION: {question}"
def uncited_sentences(answer, n_passages):
"""Return factual sentences carrying no valid citation."""
problems = []
for sentence in re.split(r"(?<=[.!?\u061F])\s+", answer.strip()):
if not sentence:
continue
cites = [int(c) for c in re.findall(r"\[(\d+)\]", sentence)]
if not cites:
problems.append(("uncited", sentence))
elif any(c < 1 or c > n_passages for c in cites):
problems.append(("bad_citation", sentence))
return problems
# Gate the response before it reaches the user.
answer = call_model(build_prompt(question, passages))
if answer.strip() == "INSUFFICIENT_CONTEXT":
route_to_human(question)
else:
issues = uncited_sentences(answer, len(passages))
if issues:
route_to_human(question, reason=issues) # never display unverified claims
else:
display(answer)Either a fully cited answer, or a routing event. The sentence splitter includes the Arabic question mark (U+061F) so Arabic responses segment correctly — a Latin-only splitter silently treats an entire Arabic answer as one sentence and the check becomes meaningless.
Diagnostic checks
- Ask questions the corpus provably does not cover. A system without abstention will invent an answer, and you will see it immediately.
- Check every citation resolves to a passage that actually contains the claim, not merely a related one.
- Measure retrieval recall@k independently of answer quality to separate the two failure modes.
- Run the same question in Arabic and English against a bilingual corpus and compare — a large gap indicates a retrieval problem, not a generation one.
- Ask about a policy that changed recently. A stale corpus produces a confidently wrong grounded answer, which is harder to spot than an ungrounded one.
- Sample production answers weekly and score support against cited passages; faithfulness degrades quietly as the corpus drifts.
When to use it
- These controls apply whenever a model's output is shown to someone outside the building.
- The domain has an authoritative document corpus that can be retrieved from.
- A wrong answer carries regulatory, financial or reputational consequence.
- The organisation can commit to keeping the corpus current — without that, grounding produces confident staleness.
When not to use it
- The task is genuinely generative — drafting, brainstorming, summarising a supplied text — where there is no external fact to be faithful to.
- No authoritative corpus exists, in which case retrieval has nothing to ground against and the honest answer is that the use case is not ready.
- Latency budgets are extremely tight and the content is low-consequence; verification adds a round trip.
- The output is always reviewed by a qualified human before use, which changes the risk profile though it does not remove the need for citations.
Limitations & prerequisites
- Grounding reduces hallucination substantially but does not eliminate it; models still over-extend and misread supplied passages.
- Citation enforcement verifies that a source was cited, not that the source supports the claim, unless entailment checking is added.
- Abstention trades coverage for reliability, and an assistant that abstains too often gets abandoned by users.
- A current, well-owned corpus is a prerequisite that most organisations underestimate and that no model choice compensates for.
What each control actually removes
These are cumulative, not alternatives. Each closes a failure the previous one leaves open.
| Control | Removes | Leaves open |
|---|---|---|
| Prompt instruction alone | Some casual fabrication | Confident invention under pressure |
| Retrieval (RAG) | Reliance on stale parametric memory | Ignoring or misreading retrieved passages |
| Citation enforcement | Uncited claims reaching the user | Cited passages that do not support the claim |
| Entailment verification | Unsupported claims with valid-looking citations | Corpus that is authoritative but out of date |
| Abstention and escalation | Answers where the corpus is silent | Coverage gaps the organisation must close |
Deploying only the first row and calling the result grounded is the most common way these systems reach production unsafely.
Key takeaways
- Hallucination follows from the training objective; it is not a bug to be prompted away.
- Retrieval converts recall into comprehension and removes a large share of the problem.
- Citation enforcement is what makes a grounded claim checkable rather than merely sourced-looking.
- Abstention must be an explicitly permitted answer or the model will fill the gap.
- In Arabic deployments the hard part is retrieval quality, and it must be measured on real Arabic queries.
FAQ
No. It reduces it substantially by replacing recall with comprehension, but a model handed irrelevant or partial passages will often still answer. Retrieval quality and verification decide the outcome.
Prompting helps at the margin and is not a control. It is not auditable, does not survive model updates reliably, and provides no evidence that a given answer was supported.
It makes output more deterministic, not more truthful. A confidently wrong answer at temperature 0 is still confidently wrong.
Sample production answers, check each factual claim against its cited passage, and report the unsupported-claim rate. Adversarial questions the corpus cannot answer should be included deliberately.
The generation is comparable; retrieval is harder. Orthographic variation, diacritics, dialect input against Modern Standard Arabic documents and mixed-script technical terms all degrade recall unless specifically evaluated.
Something explicit and unambiguous, followed by an escalation route. Silence and vagueness both push the user into guessing, which is worse than an honest refusal.
Fine-tuning can improve format adherence and domain tone, but it does not create a verifiable link between an answer and a source. Grounding does.
It must be a named business owner, not the engineering team. Currency and authority are editorial responsibilities, and a grounded system inherits whatever staleness the corpus carries.
Deploying an assistant that answers on the record?
Send the document corpus, the languages in scope and the escalation policy. We will review retrieval quality, grounding controls and what the assistant is permitted to say when it cannot find an answer.
Review an Arabic RAG architectureSources & evidence
- Lewis et al., Retrieval-Augmented Generation — The paper introducing retrieval-augmented generation.
- OWASP Top 10 for LLM Applications — Security reference covering prompt injection and insecure output handling.
- NIST AI Risk Management Framework — Governance framework for validity, reliability and accountability.
- Ji et al., Survey of Hallucination in NLG — Survey of hallucination taxonomy and evaluation approaches.
Vendor and product names are trademarks of their respective owners; references are for technical context and do not imply partnership, certification or endorsement unless stated on the vendor's official pages.