# Guardrails

EN: **Guardrails and output control** · id `guardrails`

Path: [AI Atlas](https://aiatlasgraph.com/llms.txt) › [Bezpieczeństwo i governance](https://aiatlasgraph.com/t/safety.md) › Guardrails

## Description

- PL: Blokady i filtry na wejściu i wyjściu modelu.
- EN: Blocks and filters on the model's input and output.

## In one sentence

- PL: To dodatkowe kontrole ograniczające, jakie dane model przyjmuje, jakie odpowiedzi oddaje i jakie działania wykonuje.
- EN: These additional checks limit what data a model accepts, what responses it returns and which actions it performs.

## Problem it solves

- PL: Sam model nie zawsze przestrzega reguł aplikacji, a jego odpowiedzi mogą zawierać niedozwolone treści.
- EN: A model does not always follow application rules, and its responses may contain prohibited content.

## What it does

- PL: Filtry i reguły sprawdzają wejście, przebieg oraz wynik, kierując rozmowę lub blokując wybrane zdarzenia; ich skuteczność wymaga testów.
- EN: Filters and rules check inputs, workflow and outputs, redirecting conversation or blocking selected events; their effectiveness needs testing.

## Everyday example

- PL: Asystent sklepu sprawdza, czy odpowiedź nie zawiera danych innego klienta, zanim pokaże ją rozmówcy.
- EN: A shop assistant checks that a response contains no other customer's data before showing it to the caller.

## This concerns you if you…

- PL: potrzebujesz kontroli poza samym modelem
- PL: aplikacja ma określone granice treści i działań
- EN: need controls beyond the model itself
- EN: set application boundaries for content and actions

## Keywords

Llama Guard · NeMo Guardrails · Constitutional Classifiers · content moderation · input validation · output filtering · fail-closed policies · policy enforcement

## How it works

- PL: Kontrole sprawdzają wejście, pobrany kontekst, zamiary narzędzi i wynik względem ustalonych reguł. Reguły deterministyczne oraz klasyfikatory mogą blokować, przekształcać lub przekazywać przypadek do kontroli, zanim przejdzie przez chronioną granicę.
- EN: Controls check inputs, retrieved context, tool intentions and outputs against defined rules. Deterministic rules and classifiers can block, transform or escalate cases before they cross a protected boundary.

## Limits

- PL: Filtry mylą się w obie strony i dodają opóźnienie. Kontrola tekstu nie zastępuje uprawnień narzędzi; niezabezpieczona alternatywna ścieżka może ominąć całą warstwę.
- EN: Filters make errors in both directions and add latency. Text checking cannot replace tool permissions; unprotected alternative paths can bypass the layer.

## Key terms

- PL: **punkt egzekwowania**: Miejsce wykonania, w którym reguła może zatrzymać działanie.
- PL: **fail closed**: Odmowa przejścia, gdy kontrola nie potrafi potwierdzić dopuszczalności.
- EN: **enforcement point**: An execution point where a rule can stop an action.
- EN: **fail closed**: Denying progression when a control cannot confirm acceptability.

## Know first

- [Metryki klasyfikacji i regresji (Classification and regression metrics)](https://aiatlasgraph.com/t/classmetrics.md)
- [Structured outputs i walidacja (Structured outputs and validation)](https://aiatlasgraph.com/t/structured.md)

## Examples

- PL: klasyfikatory bezpieczeństwa · programowalne rails · moderacja treści
- EN: safety classifiers · programmable rails · content moderation

## Subtopics (2 direct, 2 in total)

- [Klasyfikatory bezpieczeństwa wejścia i wyjścia (Input and output safety classifiers)](https://aiatlasgraph.com/t/safetyclassifiers.md): Separate, usually smaller models that score the prompt and the response against a harm taxonomy and block what is not allowed. They can be adapted to a custom category list.
- [Programowalne reguły przepływu rozmowy (rails) (Programmable dialogue rails)](https://aiatlasgraph.com/t/programmablerails.md): Rules plugged into different stages of an LLM application — input, dialogue, retrieval, tool execution and output — that keep the conversation on topic and on script.

## Related topics

Untyped, symmetric "see also" links.

- [Bezpieczeństwo aplikacji AI (AI application security)](https://aiatlasgraph.com/t/security.md)
- [Ewaluatory kodowe (Code-based evaluators)](https://aiatlasgraph.com/t/codeevals.md)
- [Filtrowanie szkodliwych treści tekstowych w danych treningowych (Harmful text filtering in training data)](https://aiatlasgraph.com/t/contentsafetyfiltering.md)
- [Monitor interwencji krokowej dla agentów (Step-level timely intervention monitors for agents)](https://aiatlasgraph.com/t/stepsafe.md)
- [Nadzór nad modelami generatywnymi w bankach (Generative AI risk management in financial institutions)](https://aiatlasgraph.com/t/genaimrmfin.md)
- [Projektowanie na wypadek błędów AI (Error handling and graceful failure)](https://aiatlasgraph.com/t/gracefulfailure.md)
- [Sondy klasyfikacyjne (probing) (Probing classifiers)](https://aiatlasgraph.com/t/probing.md)

## Sources

- [DeepLearning.AI — course catalogue](<https://www.deeplearning.ai/courses>) `dlai` · course catalogue: 42 topic labels with counts, about 130 courses.
- [Llama Guard: LLM-based Input-Output Safeguard for Human-AI Conversations](<https://arxiv.org/abs/2312.06674>) `llama-guard-2023` · by H. Inan, K. Upasani, J. Chi, R. Rungta i in. (11 autorów; Meta), M. Khabsa
- [NeMo Guardrails: A Toolkit for Controllable and Safe LLM Applications with Programmable Rails](<https://arxiv.org/abs/2310.10501>) `nemo-guardrails-2023` · by T. Rebedea, R. Dinu, M. Sreedhar, C. Parisien, J. Cohen (NVIDIA)

---

AI Atlas revision 124 (2026-10-31) · HTML: https://aiatlasgraph.com/t/guardrails · index: https://aiatlasgraph.com/llms.txt · everything: https://aiatlasgraph.com/llms-full.txt · updated 2026-10-30
