Skip to content
mentoor

Guardrails for LLM features

For engineers

Input and output checks, moderation, policy classifiers and guardrail tools, layered with tool limits and approvals, and measured for both bypasses and false blocks

See where you stand

110 questions across four stages: Understand, Apply, Solve and Judge.

Try 5 questions

Practice items, not counted towards your mastery. No account needed.

Check yourself · 1 of 5

A feature needs a maximum message size, a card-number redaction and a moderation call. In what order should the checks run?

Choose one answer

Check yourself · 2 of 5

A model reply should be JSON with an amount field, but the amount is missing. What is the usual first action?

Choose one answer

Check yourself · 3 of 5

Your policy says "never quote prices." A provider moderation endpoint scores hate, violence and self-harm. What follows?

Choose one answer

Check yourself · 4 of 5

An agent has a read-only database role and no network access. A prompt injection gets through the classifier. What limits the damage?

Choose one answer

Check yourself · 5 of 5

A filter blocks an attack in English but lets the same request through in Base64. What pattern is this?

Choose one answer

Topics

  1. Input checks before the model call5 min read · Length and format limits, moderation, personal-data detection, topic classifiers and injection classifiers on untrusted content, and the latency each check adds
  2. Output checks before users see a response5 min read · Schema validation, moderation, personal-data and secret scanning, grounding and citation checks, and the choice between blocking, rewriting and flagging, including for streamed output
  3. Guardrail tools and policy models5 min read · Provider moderation endpoints, Llama Guard, NeMo Guardrails, Guardrails AI and cloud guardrail services such as Bedrock Guardrails compared on policy coverage, latency and hosting
  4. Layering guardrails with tool limits and approvals5 min read · Guardrails as one layer among least privilege, sandboxing, rate limits and human approval, because any single classifier can be fooled
  5. Guardrail bypasses and false positives5 min read · Encodings, other languages, multi-turn setups and indirect content that slip past filters, and over-blocking that refuses legitimate users; measuring both rates on a labelled set

Start here

110 questions · last verified 2026-12