Generative AI

Guardrails

Guardrails are the controls placed around a generative AI model that check inputs and outputs against rules so the system stays within its intended scope, tone, and legal limits.

What are guardrails?

Guardrails are the layer of controls that sits between users, a generative AI model, and the systems it can reach, checking what goes in and what comes out against rules the business has set. The model itself is probabilistic and will sometimes produce an answer that is off-topic, incorrect, offensive, or outside its remit. Guardrails catch those cases before they reach a customer or a system of record.

Guardrails are several mechanisms working together. Input checks screen prompts for prompt injection attempts, requests outside the allowed topics, and personal data that should be redacted before it reaches the model. Output checks screen the response for policy violations, leaked secrets, unsupported claims, and missing disclaimers. A system prompt sets the model’s role and boundaries. Tool permissions limit which actions an agent can take, and an approval workflow requires a person to confirm anything that changes a record. Some checks are simple pattern rules; others use a second, smaller model as a classifier.

Why guardrails matter

Good behavior in testing does not guarantee good behavior at scale. Guardrails turn a policy document into enforcement that runs on every request and leaves a log. They are also how a company meets its obligations: a healthcare provider cannot allow an assistant to give diagnoses, a lender cannot allow it to quote terms it has not been approved to quote, and a collections agency must keep every message within the language the law permits. Auditors increasingly ask to see these controls as part of AI governance.

Guardrails in practice

A collections agency deploys an assistant that drafts letters and text messages to account holders. Input guardrails block any attempt to use it on accounts the representative is not assigned to. Output guardrails check each draft against a list of prohibited phrases, confirm the required disclosures are present, and reject drafts that imply legal action the agency has not authorized. A representative still reads and sends each message. Rejections are logged with the reason, and compliance staff review the log weekly. In Kirk Tech Solutions engagements, each guardrail rule is written down with an owner and a test case, so it can be audited and changed without touching the model.

What to watch for

  • A determined user can sometimes get past a filter, so keep a human approval step for consequential actions.
  • Over-tight rules make an assistant refuse legitimate requests and drive users to unapproved tools, so measure false refusals as well as misses.
  • Ask a vendor where each check runs, what it logs, and whether rules can be changed without redeploying the model.
  • Test guardrails with adversarial inputs during AI red teaming, since friendly test users rarely find the gaps.

← Back to AI Glossary