L169 · Under the hood · 2 min

Guardrails on the way in

Input guardrails check what users send before the model sees it, catching private data, abuse and tricks early.

01 · The idea

Anyone can type anything into a public chat box. Some messages contain things the system should never pass on, like full card numbers. Some are attempts to make the bot break its rules, often called jailbreaks.

An input guardrail is a check that runs first. Simple ones use rules: block messages over a certain length, hide anything that looks like a phone or ID number. Smarter ones use a small classifier model that labels the message as fine, off-topic, abusive or a likely trick.

When a check fires, the app can block the message, remove the risky part, ask the user to rephrase, or hand the chat to a person. A bank bot might reply "Please do not share your card number here" and blank it out.

Guardrails make mistakes both ways. Too strict and they block normal customers, too loose and tricks slip through. Teams test them with real examples, keep a log of what was blocked, and adjust over time.

02 · Think of it like this

It is the security desk at a building entrance. Most visitors walk straight in, a few get asked to leave their bags, and a rare one is turned away.

03 · Do it now

04 · Quick check

A customer pastes their full card number into a help bot. What should a good input guardrail do?