Safety & security

Guardrails

AI-assisted editorial review:

Guardrails are external safety controls, used in AI security, ethics and governance, that check an AI model's inputs and outputs while the application runs and block risky responses without retraining the model.[1] They apply rules set separately from the model, such as avoiding harmful topics, following a predefined conversation path or keeping a particular style or format.[1] There are two broad approaches: programmable rails, where rules and dialogue flows are written as code,[1] and model-based safeguards, where a classifier labels inputs and outputs as safe or unsafe.[2] Unlike alignment built into a model during training, guardrails can be changed while the service is running.[1]

What does Guardrails mean in simple terms?

Guardrails work like the railings along a road: they help limit responses that violate the application’s rules. Instead of changing the model itself, they check incoming questions and outgoing answers in real time and stop risky content.[1][2] Think of the final checklist a team runs before sending a document to a client, catching banned wording, confidential details and formatting errors. For example, when a company chatbot receives a request to produce abusive language, an input guard can stop it before it reaches the model, and an output guard checks the answer again before it is shown.[6] Teams can use guardrails as one part of meeting safety requirements before launching an AI service.[4]

How can Guardrails be explained with an analogy?

A final inspection gate that catches wording that breaks the contract before a delivery goes out.

Where is Guardrails used?

Case 1

Meta — Llama Guard classifies both inputs and outputs

Meta researchers released Llama Guard in December 2023.[2] It is a Llama 2-7B model instruction-tuned to classify both user prompts and model responses against a safety risk taxonomy.[2] On the OpenAI Moderation evaluation set, which it was not trained on, Llama Guard adapted zero-shot to the OpenAI categories scored close to OpenAI's own moderation API.[2] It illustrates a classifier-style safeguard placed on both the input and output side.
Result: AUPRC 0.847 zero-shot vs 0.856 for the OpenAI Moderation API on the OpenAI Moderation evaluation set (paper's own evaluation).[2]

Case 2

NVIDIA — NeMo Guardrails in enterprise use

NVIDIA offers NeMo Guardrails, an open-source toolkit for adding programmable rails to LLM applications.[1] In January 2025, NVIDIA's blog said Amdocs, Cerence AI and Lowe's were among the companies using it.[4] Lowe's said it uses NeMo Guardrails to enforce conversational boundaries and deliver only relevant and appropriate content.[4] It illustrates the programmable-rails approach, where rules and dialogue flows are written in code.[1]
Result: Named users include Amdocs, Cerence AI and Lowe's; no quantitative results were published.[4]

Case 3

NAVER — AI Safety Framework (ASF) [Korea]

In August 2024, NAVER published a beta version of its AI Safety Framework (ASF).[5] It is a governance framework for identifying, assessing and managing risks at every stage of developing and deploying AI systems, so it works at a different level from runtime guardrails.[5] It defines two risk types, loss of control and misuse, and says frontier AI is assessed every three months, or earlier if a system's capabilities are judged to have grown sixfold.[5] NAVER also built Korean safety datasets such as SQuARe, KoSBi and KoBBQ with outside partners and used them for HyperCLOVA X.[5]
Result: AI risk assessment scale and matrix, plus Korean safety datasets; no quantitative results were published.[5]

Case 4

KT — SafetyGuard real-time guardrail [Korea]

In its Responsible AI Technical Report, KT released its own guardrail, SafetyGuard.[6] It has two parts: Prompt Guard, which blocks malicious inputs such as prompt injection and jailbreak attempts, and Content Guard, which checks outputs.[6] Content Guard offers a binary module that labels responses safe or unsafe and a separate multi-label module that scores severity per risk category.[6] The binary module is trained to judge partial responses in 100-character chunks so that it can work during streaming.[6]
Result: Content binary guard F1 of 91.62 (offline) and 92.52 (streaming) on KT's own SafetyGuard benchmark; the version with additional prefix fine-tuning scored 98.38 and 98.36.[6]

Try it today

  1. List five topics your company chatbot must not handle, for example medical diagnosis, legal advice, disparaging competitors, requests for personal data and abusive language.
  2. Open an example rail from NeMo Guardrails and mark where the input rails and output rails are applied.[1]
  3. Send the same risky question to your in-house model two or three times and record exactly what is blocked and what gets through.
  4. Put the safety taxonomy from the Llama Guard paper next to your list of banned topics and fill in what is missing.[2]
  5. Pick one evasion technique, such as character injection, and put on a team meeting agenda whether it gets past your current guard.[7]

Limits and direction

Guardrails are not a perfect shield. A 2025 study tested character injection and adversarial machine-learning techniques against six prominent protection systems, including Microsoft's Azure Prompt Shield and Meta's Prompt Guard, and reported evasion success of up to 100% in some cases.[7] A 2025 systematization-of-knowledge paper found the guardrail landscape fragmented, without a unified taxonomy or evaluation framework, and proposed evaluating guardrails on security, efficiency and utility, since stronger protection can cost speed or usefulness.[8] The open-source framework Guardrails AI breaks risks into reusable checks called validators, but people still have to decide which risks to block and how strictly.[3] Programmable rails are independent of the underlying model, but someone has to define and maintain the rules.[1]

Two directions stand out. First, guardrails are being packaged as deployable services for AI agents: NVIDIA offers NIM microservices for content safety, topic control and jailbreak detection as part of its NeMo Guardrails tools.[4] Second, safeguards are shifting from hand-written rules toward classifier models, streaming checks and language-specific data, as Llama Guard and KT's Korean SafetyGuard show.[2][6] In Korea, NAVER has published a governance framework and KT a runtime guardrail.[5][6] NVIDIA recommends combining several lightweight, specialized guard models rather than relying on one general policy.[4]

Which sources explain Guardrails?

  1. NVIDIA (arXiv) — NeMo Guardrails: A Toolkit for Controllable and Safe LLM Applications with Programmable Rails (2023-10-16) — https://arxiv.org/abs/2310.10501
  2. Meta (arXiv) — Llama Guard: LLM-based Input-Output Safeguard for Human-AI Conversations (2023-12-07) — https://arxiv.org/abs/2312.06674
  3. Guardrails AI (GitHub) — guardrails README (accessed 2026-10-13) — https://github.com/guardrails-ai/guardrails
  4. NVIDIA Blog — NVIDIA Releases NIM Microservices to Safeguard Applications for Agentic AI (2025-01-16) — https://blogs.nvidia.com/blog/nemo-guardrails-nim-microservices/
  5. NAVER Cloud CLOVA Tech Blog — NAVER AI Safety Framework (ASF) (2024-08-07) — https://clova.ai/tech-blog/ko-naver-ai-safety-framework-asf
  6. KT (arXiv) — Responsible AI Technical Report (v4, 2026-03-19) — https://arxiv.org/abs/2509.20057
  7. Hackett et al. (arXiv) — Bypassing LLM Guardrails: An Empirical Analysis of Evasion Attacks against Prompt Injection and Jailbreak Detection Systems (2025-04-15) — https://arxiv.org/abs/2504.11168
  8. Wang et al. (arXiv) — SoK: Evaluating Jailbreak Guardrails for Large Language Models (2025-06-12) — https://arxiv.org/abs/2506.10597