Why this matters now:Gartner named AI Runtime Defense as a category in its 2026 Hype Cycle for AI Governance Technologies, defining it as technology that implements intent-based policy enforcement and anomaly detection for AI applications in production. The EU AI Act, now in full enforcement as of August 2026, requires auditability and human oversight for high-risk AI systems. And Gartner's 2025 research projects that AI-related legal claims will exceed 2,000 by the end of 2026, driven specifically by insufficient AI risk guardrails. For regulated industries including healthcare and financial services, that liability is already accruing with every week of ungated production traffic.

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."
4.8%
minimum hallucination rate for the best-performing frontier model on summarization tasks in the Vectara HHEM leaderboard (February 2026). The worst performer in the top tier reaches 20.2%, and both figures apply only to the controlled summarization task
>2,000
AI-related legal claims projected by Gartner by end of 2026, specifically attributed to insufficient AI risk guardrails in production deployments. The figure represents a sharp increase from 2024 (Gartner, 2025)
100-300ms
acceptable latency budget for a production LLM output guardrail check per request, based on guidance from the Openlayer and Maxim platforms (2026). Checks exceeding this budget require async or batch processing

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 configurationWhat it catchesWhat it missesProduction failure patternRisk level
No guardrailsNothing. Model output reaches users without any safety check on input or outputHallucinated facts, fabricated citations, PII in generated text, policy violations, prompt injection attacks, jailbreaksApplication 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 factCritical
Keyword and pattern blocking onlyExplicit banned terms, obvious PII formats such as SSNs and credit card numbers in predictable patterns, profanity and slurs on a blocked listSemantic 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 rulesTeam 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 categoriesHigh
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 typesHallucinated 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 manipulationTeam 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 checksHigh
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 categoriesHallucinated 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 dataApplication 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 languageModerate
Layered input plus output with factual grounding checksPrompt 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 pipelinesNovel 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 processingClosest 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 deploymentLower

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.

Stage 1
Reactive safety

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.

Stage 2
Layered enforcement

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.

Stage 3
Runtime defense

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.

LLM production guardrail checklist
Application risk profile documented before any guardrail configuration is chosen.Map the specific failure modes that matter for your application: factual accuracy failures (clinical dosages, contract clauses, regulatory requirements), PII exposure (cross-tenant leakage, sensitive data in generated summaries), policy violations (regulated advice, competitive content, off-topic responses), and adversarial inputs (prompt injection, jailbreaks, data extraction). The guardrail configuration follows from the risk profile. Applications with no factual grounding requirement need a different safety stack than clinical or financial applications where incorrect facts have regulatory consequences.
Input guardrails implemented for prompt injection and topic scope before output checks are added.Input-side enforcement is the cheaper and faster check per request and prevents a class of failures before the model is called at all. Prompt injection detection blocks adversarial attempts to override system instructions. Topic scope enforcement returns a predefined refusal for out-of-domain queries rather than passing them to the model and then filtering the output. Both checks run in tens of milliseconds and reduce the attack surface that output guardrails need to cover. Add input checks first, measure their catch rate on adversarial test cases, then add output checks for the failure modes that remain.
PII detection configured for the specific identifier types relevant to your data and jurisdiction.Generic PII detection libraries catch common formats such as social security numbers, credit card numbers, and standard email addresses, but miss jurisdiction-specific identifiers, healthcare record numbers, and PII in non-standard formats such as paraphrased descriptions of personal data. Configure your PII detection for the identifier types that appear in your corpus and the data protection regulations that govern your users. If your RAG pipeline can surface cross-tenant chunks, add cross-tenant isolation checks at the retrieval layer, before the chunk reaches the model, rather than relying on output detection alone.
Factual grounding checks implemented with access to the retrieval context, not as a standalone output filter.Hallucination detection requires the source material to compare against. A standalone output filter that only sees the generated response cannot determine whether a factual claim is supported by the retrieved documents; it can only run surface-level consistency checks that miss most factual errors. The grounding check needs to be integrated into the pipeline so it has access to the retrieved chunks used for each request. For RAG applications, this means the safety layer is part of the retrieval pipeline, not an add-on at the response boundary. For applications without retrieval, grounding checks are limited to consistency within the conversation context and cannot verify claims against external facts.
Guardrail thresholds calibrated on a labeled eval set before production deployment, not set to defaults.Guardrail libraries ship with default thresholds that are tuned for general-purpose use. In a clinical application, the hallucination threshold that minimizes false negatives (missed hallucinations) on general text may produce a high false positive rate on correctly phrased medical content, blocking accurate responses that use clinical terminology the model interpreted as uncertain. Calibrate your thresholds on a labeled set of real examples from your domain before deploying, and measure both false positive and false negative rates. A threshold that blocks 10 percent of correct responses is a user experience problem. A threshold that lets through 30 percent of hallucinations is a compliance problem. Neither is acceptable, and the right threshold for your domain is not the library default.
Audit log per request created with enough context to reconstruct what the model received and produced.EU AI Act compliance for high-risk AI systems requires audit trails that demonstrate human oversight and allow post-incident investigation. Each production request should log the input, the retrieved context if applicable, the model output before guardrail checks, the guardrail check results with the specific flags raised, and the response delivered to the user. Logs should be retained according to your data retention policy and accessible to compliance teams without requiring engineering support for each retrieval. If your application is currently logging only the final response, you are not capturing the information needed to investigate a complaint or respond to a regulatory inquiry.
Human review queue in place for flagged responses before full automation is assumed.Guardrail systems have false positive and false negative rates. In regulated workflows, flagged responses should go to a human reviewer rather than being automatically blocked or automatically passed. This is especially important during the first weeks after a guardrail is deployed, before calibration is complete. Build the human review queue before you need it. Discovering during an incident that there is no process for a human to review a flagged clinical response is a governance failure that the EU AI Act addresses explicitly in its human oversight requirements for high-risk AI systems.
"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.