Why the model itself cannot be your only line of defense
The assumption embedded in most enterprise LLM deployments is that a capable model is a safe model. The Vectara Hallucination Evaluation Model (HHEM) leaderboard tells a different story. As of its February 2026 snapshot, the best-performing frontier model achieves a 4.8 percent hallucination rate on summarization tasks, and the worst in the top tier reaches 20.2 percent. These numbers represent the rate at which a model adds unsupported claims to a response even when it was given the source material and told to summarize it. In open-domain question answering, the hallucination rates are substantially higher. The model quality problem is real, and it is improving. But a 4.8 percent floor means that a production pipeline processing 10,000 requests per day produces at least 480 incorrect or fabricated responses, every day, before any output check runs.
PII is a separate failure mode. A March 2026 arXiv preprint studying inference-time PII leakage across 11 PII types found that models restate personally identifiable information from the prompt even when instructed not to. In a RAG pipeline, the problem compounds: the retrieval layer can surface a chunk from one user's document into the context assembled for a different user's query, and the model will then include that cross-tenant PII in its response. The model is not the right place to enforce data isolation because the model cannot distinguish between PII it was given intentionally and PII that entered its context through a retrieval error. That boundary needs to be enforced before the model sees the data and again after it generates a response.
Content policy is the third layer. Enterprise LLM applications have implicit or explicit policies about what the system is permitted to say: topics it should decline, formats it should avoid, regulatory claims it cannot make, and competitive content it should not generate. Models trained on broad internet text have no inherent knowledge of your organization's policies. Without explicit enforcement, the model will occasionally produce responses that violate those policies using perfectly clean, non-harmful language that keyword filters miss entirely. Policy enforcement requires semantic understanding of the response in context, not pattern matching on a word list.
"A capable model reduces the guardrails problem. It does not eliminate it. At 4.8 percent hallucination on the best available model, production traffic at scale makes incorrect output a daily certainty rather than an edge case."
The 5 guardrail configurations: what each catches and what it misses
Guardrail architecture is not binary. Teams add layers incrementally, and each layer catches a different class of failure. The configurations below range from no protection to a production-grade safety stack, with specific failure modes and typical production failure patterns for each.
| Guardrail configuration | What it catches | What it misses | Production failure pattern | Risk level |
|---|---|---|---|---|
| No guardrails | Nothing. Model output reaches users without any safety check on input or output | Hallucinated facts, fabricated citations, PII in generated text, policy violations, prompt injection attacks, jailbreaks | Application runs for weeks or months before the first visible failure surfaces through a support ticket or external report. By then, thousands of ungated responses have reached users. Legal and compliance teams are notified after the fact | Critical |
| Keyword and pattern blocking only | Explicit banned terms, obvious PII formats such as SSNs and credit card numbers in predictable patterns, profanity and slurs on a blocked list | Semantic policy violations that use clean language. PII in non-standard formats such as "my card ending in four two one nine." Hallucinated facts that contain no blocked words. Indirect jailbreaks and prompt injections that work around keyword rules | Team deploys a word list and considers the safety problem addressed. Adversarial users quickly discover that reworded requests bypass every filter. Policy violations continue in legally clear language. Compliance audit finds the guardrail provides no meaningful protection for the actual risk categories | High |
| Input-only guardrails (prompt injection blocking, topic scope enforcement) | Prompt injection attacks, jailbreak attempts, out-of-scope topics on input, PII submission filtering for regulated data types | Hallucinated outputs generated from clean inputs. PII surfaced from retrieval context into the model's output. Policy violations in the generated response. Factual errors in model-generated content that are unrelated to input manipulation | Team correctly blocks adversarial inputs but does not check the output. A clean, in-scope query causes the model to hallucinate a dosage figure in a healthcare context, cite a regulatory requirement that does not exist, or include a retrieved PII fragment from another user's document. None of these fail input checks | High |
| Output content safety plus PII detection (no factual grounding) | Content policy violations in generated text. PII in model outputs using entity recognition. Harmful or regulated content categories | Hallucinated facts that are neither harmful nor PII: a wrong dosage, an incorrect contract clause, a fabricated regulatory citation. Factual drift relative to source documents. Confident incorrect statements about policies, procedures, or data | Application passes compliance review because it blocks harmful content and detected PII. Clinical or financial use cases then surface a different problem: the model produces confidently incorrect factual claims that content safety checks cannot detect because the claims are phrased in clean, professional language | Moderate |
| Layered input plus output with factual grounding checks | Prompt injection and jailbreaks on input. PII and content policy violations on output. Factual drift relative to source documents (hallucination detection). Cross-tenant data isolation failures in RAG pipelines | Novel adversarial techniques not represented in training data for the guardrail models. High-specificity domain claims where grounding requires specialized ontologies. Latency budget exceeded on complex multi-hop grounding checks without async processing | Closest to production-safe. Primary failure mode is misconfigured grounding thresholds: too strict causes false positives that block correct responses; too loose lets plausible hallucinations pass. Requires calibration on domain-specific eval data before deployment | Lower |
The most common gap in enterprise deployments is a mismatch between the guardrail configuration and the actual risk profile of the application. A healthcare application referencing dosages, drug interactions, or clinical guidelines has a factual accuracy risk that content safety filters cannot touch. Financial services applications generating regulatory summaries face compliance risk in a different category entirely: factual drift and incorrect citations, which PII detection does nothing about. The guardrail configuration needs to map to the specific failure modes of the application, not to a generic safety checklist borrowed from a consumer product context.
Not sure which guardrail gaps your LLM application has?
10decoders audits your production LLM application's safety stack against your organization's specific risk profile, identifies the guardrail gaps that your current configuration leaves open, and implements the layered input and output safety architecture your domain requires. Our CheiAI compliance framework covers healthcare, financial services, and regulated industry requirements including EU AI Act readiness and HIPAA-grade output controls.
Book a Free AI Assessment →Why hallucination detection needs to be separate from content safety
Content safety and hallucination detection are distinct engineering problems that most teams conflate. Content safety checks whether a response violates a policy category: harmful content, explicit material, discriminatory language, regulated advice claims. Hallucination detection checks whether a response makes factual claims that are not supported by the source material the model was given. A response can pass every content safety check and still be factually wrong. The hallucination passes every content safety filter because it uses clean, professional language. It is simply wrong, and in a clinical or financial context, wrong carries the same legal consequence as harmful.
Factual grounding checks work by comparing the claims in the model's output against the source documents retrieved for that query. The check requires access to the retrieval context used for each request, which means the guardrail system needs to be integrated into the retrieval pipeline, not bolted onto the output stream after the fact. This is the most common architectural mistake in production guardrail implementations: the safety layer is added as a final output filter without access to the context that would allow it to verify factual claims. At that point, the only checks it can run are content safety and PII detection, because those do not require knowledge of what the model was supposed to say.
The latency implication is worth planning for. A synchronous factual grounding check that re-queries an NLI model or a cross-encoder against each retrieved chunk adds 100 to 300 milliseconds per request at the 90th percentile, based on guidance from production observability platforms. For conversational applications with a user waiting, that budget is acceptable if the check runs in parallel with response streaming. For high-throughput batch pipelines, the check can run asynchronously with a human review queue for flagged responses. The key decision is not whether to run grounding checks but whether to run them synchronously in the request path or asynchronously with a queue for flagged output.
Content policy plus PII blocking
Content safety checks block regulated categories on output and PII entity detection catches common identifier formats. There is no input-side enforcement and no factual grounding. Visible harm is addressed but factual accuracy failures pass through unchecked.
Input controls plus output safety
Prompt injection detection and topic scope enforcement on input, content safety and PII detection on output. Factual grounding checks run asynchronously for high-stakes domains so they do not add latency to the synchronous request path. This covers the core safety perimeter for most enterprise use cases.
Policy-as-code with anomaly monitoring
Declarative safety policies enforced at the gateway layer, applied consistently across every model call. Anomaly detection flags distributional drift in output patterns. Human review queue for flagged responses in regulated workflows. Audit log per request for compliance lineage.
The production guardrail implementation checklist
Each item below should be verified before an LLM application is deployed to production or before an existing production application is considered compliant with the EU AI Act high-risk requirements taking effect in 2026. Retrofitting a safety stack after deployment is substantially more expensive than building it into the initial architecture.
"Guardrails added after a legal claim lands are not guardrails. They are evidence that you knew about the problem and acted only under pressure. Build the safety stack before production traffic, not in response to it."
What to do this week
01 Run your production LLM application against a hallucination eval set and record the failure rate
Take 50 queries representative of your production traffic, run them through your LLM application, and manually review each response for factual accuracy, PII presence, and policy compliance. Record how many responses contain at least one error in each category. This number is your current unguarded failure rate. It is also the baseline against which any guardrail configuration improvement can be measured. Teams that skip this step add guardrails without knowing what they are catching, which makes it impossible to know whether the guardrail is calibrated correctly or whether it needs to be tightened. The eval set review takes half a day for a team of two and produces the most important measurement your safety program needs.
02 Map your application's specific risk categories before selecting any guardrail library
Write down the three most consequential failure modes for your specific application: the failures that would cause a regulatory action, a legal claim, or significant user harm. If your application is a healthcare assistant, the list likely includes factual accuracy on clinical topics, PII leakage across users, and off-label medical advice. If it is a financial services chatbot, the list includes incorrect regulatory citations, investment advice claims, and sensitive financial data in generated text. The guardrail library you choose and the threshold configuration you apply should be driven by this list, not by what the library ships with by default. Libraries optimized for content safety on consumer products are not the same as libraries built for factual grounding in regulated enterprise workflows.
03 Add asynchronous hallucination logging even if synchronous checks are not yet in place
If your application does not yet have a factual grounding check in the synchronous request path, the fastest way to get visibility into your hallucination rate is to log every request with its retrieval context and run a grounding check asynchronously on a sample. This requires no latency budget in the user-facing path and gives you the data you need to calibrate your thresholds before you add synchronous enforcement. Many teams discover through asynchronous logging that their hallucination rate is 2 to 3 times higher than expected on domain-specific queries, which changes the priority of adding synchronous grounding checks compared to other engineering work. Run asynchronous logging for two weeks before deciding how to invest in synchronous safety checks.
04 Verify that your audit log captures the retrieval context, not just the final response
Check your current production logging. If it captures only the user query and the final response, you are logging the least useful information for a compliance investigation. The retrieval context used for each request, the model's output before guardrail processing, and the guardrail results for each check are the records that allow you to reconstruct what happened and demonstrate that your safety controls were operating correctly. Add these fields to your logging schema this week. The engineering cost is low. The compliance cost of not having them when a regulator asks is not.
Let 10decoders audit and harden your enterprise LLM safety stack
We assess your production LLM application's current guardrail configuration against your organization's risk profile, identify the gaps between your existing safety stack and what your domain and regulatory obligations require, and implement the layered input and output safety architecture that closes them. Our CheiAI compliance framework covers healthcare, financial services, and EU AI Act requirements, including factual grounding checks, PII isolation, and audit trail implementation for high-risk AI workflows.
