Glossary term

LLM guardrails

LLM guardrails are checks placed around a language model to keep its inputs and outputs within safe and expected limits. They can block harmful prompts, stop the model from leaking sensitive data, and filter or rewrite answers that break the rules.

Common types of guardrail

  • Input guardrails: detect prompt injection, jailbreak attempts and off-topic requests before they reach the model.
  • Output guardrails: check answers for toxic content, personal data, made-up facts or a wrong format.
  • Action guardrails: limit which tools, data and actions an AI agent is allowed to use.

How to test guardrails

  • Run a library of attack and edge-case prompts and check that each one is blocked or handled.
  • Check for false positives too: normal requests should still get useful answers.
  • Re-run the tests whenever the model, prompt or guardrail rules change.

Read the full guide: Prompt Injection Testing: How QA Teams Test LLM Apps (2026)

← All glossary terms

Scroll to Top