# Guardrail Tools: Llama Guard, NeMo Guardrails, Cloud Filters

> The three main kinds of guardrail tool for AI apps, what each one does and how to choose between them, explained simply for your AI interview.

**In short:** Guardrail tools are ready-made checks that screen what goes into an AI model and what comes out. Llama Guard is an open-weight model that classifies text against safety risks, NeMo Guardrails is an open toolkit for writing your own rules, and cloud filters are hosted checks you call from AWS, Azure or OpenAI.

AI and LLM interview question Q223, Guardrails and AI safety. Intermediate, common (our estimate). From Venkat R. Murty's free Interview Kit: https://designervenkat.online/interview/ai/guardrail-tools-llama-guard-nemo-guardrails

## Say it in 30 seconds

Guardrail tools check what goes into an AI model and what comes out. There are three main kinds. Llama Guard is an open-weight model from the Llama team that sorts text into safety risk categories. NeMo Guardrails, from NVIDIA, is an open toolkit where the team writes its own rules. Cloud filters, like Amazon Bedrock Guardrails or Azure AI Content Safety, are hosted checks I call over an API. I'd pick by where the app runs, how much control I need, and who keeps the rules up to date.

## Say it in 2 minutes

A guardrail tool is a check that runs around an AI model. It reads what the user typed before the model sees it, and it reads the model's reply before the user does. Teams rarely build every check from scratch, so there are three common kinds of tool to know.

Llama Guard is an open-weight model, which means its weights are published so you can run it yourself. You give it a message and a list of risk categories, and it labels the message against them. The paper says that fine-tuning, which means training the model further on your own examples, lets you adjust those categories to fit specific use cases. NeMo Guardrails is an open-source toolkit from NVIDIA. The team writes its rules in YAML config files, which are plain text settings, and those rules can call a safety model like Llama Guard as one of their steps.

Cloud filters are the hosted option. Amazon Bedrock Guardrails, Azure AI Content Safety and OpenAI's moderation models each check text for harmful content, and some also check for personal data or prompt attacks. You call them over an API, which is a way for one program to send a request to another, so your team does not run those checks itself.

None of them is a complete fix. A filter spots patterns, so a rephrased attack can still get past it. I would layer them, pick by where the app runs and who maintains the rules, and test the whole chain with real attempts before launch.

## What are guardrail tools, in plain words?

A guardrail tool is a check that runs around an AI model. It reads what the user typed before the model sees it, and it reads the model's reply before the user sees that. If a check fails, the app blocks the message, hides the reply or hands the case to a person.

Think of a bank's payments team. Every transfer passes a fraud screen before it goes out, and a second check reviews it before the money lands. The screen is one layer of the bank's protection. Guardrail tools are ready-made screens for AI apps, and you place them around the model. A support bot that answers a bank's customers works the same way. A screen checks the customer's question, the bot drafts a reply, and a second screen checks the reply before the customer sees it.

- **Guardrail:** A check on what goes into or comes out of an AI model.
- **Classifier:** A model that sorts text into labels, such as safe or unsafe.
- **Risk category:** A named kind of harm, such as hate or violence, that a check looks for.
- **Hosted filter:** A check that a cloud provider runs for you, called over an API.
- **API:** A way for one program to send a request to another over the internet and get a reply back.

## What are the three kinds of guardrail tool?

Llama Guard, NeMo Guardrails and cloud filters each do a different job. Know what each one is, and who runs it.

- **Safety model: Llama Guard.** An open-weight model from the Llama team that sorts a prompt or a reply into risk categories. You can run it yourself and fine-tune its categories.
- **Toolkit: NeMo Guardrails.** An open toolkit from NVIDIA. The team writes its rules in YAML config files, and can call a safety model as one step.
- **Hosted service: Cloud filters.** Amazon Bedrock Guardrails, Azure AI Content Safety and OpenAI moderation. You call an API, and the provider runs the checks.

> "We introduce Llama Guard, an LLM-based input-output safeguard model geared towards Human-AI conversation use cases." (Llama Guard paper, on arXiv)
>
> "NeMo Guardrails is an open-source toolkit for easily adding programmable guardrails to LLM-based conversational systems." (NVIDIA, NeMo Guardrails paper)
>
> "Guardrails are made up of controls that specify the risk to detect, where to scan for it, and how the model or agent should respond when it is found." (Microsoft, Azure AI guardrails overview)

The tools also combine. NVIDIA's own docs list Llama Guard among the community safety models that NeMo can call, so a team can run Llama Guard inside its NeMo rules.

*Diagram, Three kinds of guardrail tool: One app, three kinds of tool. The app sends its text to the tool it picks, or to several, and the verdict decides what happens next. A team often combines two of them.*
1. Your app sends its text to the tool it picks, or to several.
2. The tool's verdict decides whether the text is allowed, blocked or sent to a person.

## How do the tools fit together in a real app?

Take a made-up claims assistant at a mid-size insurer. Customers ask about their claims in a chat, and the assistant drafts answers from the policy documents. The team puts a cloud filter on the way in and Llama Guard on the way out.

*Diagram, Layering tools in a claims assistant: A made-up insurer's claims assistant with two checks. The cloud filter screens what comes in, the model drafts the answer, and a second check reviews the draft before the customer sees it. Each tool covers one job.*
1. The question enters the app, and it is read before the model.
2. The cloud filter flags attacks and personal data before the model runs.
3. The model's draft is passed on to Llama Guard before anyone sees it.
4. Llama Guard checks the draft against the team's risk categories. Unsafe drafts go to a person.

1. **Screen the input:** The cloud filter flags prompt attacks (text written to trick the model) and personal data, such as a social security number or an address, before the model runs.
2. **Check the draft:** Llama Guard checks the drafted reply against a risk list the team has fine-tuned it to check for, such as promising a payout the policy does not cover. An unsafe draft goes to a claims handler, never to the customer.
3. **Log and test:** Every block is logged. The team tests the whole chain with real attempts, since misses only show up under attack.

## What can't these tools do?

They lower the risk, and a determined attacker can still get past them. A filter reads patterns and categories, so a rephrased or encoded attack can slip through. Encoding means disguising text in another form. OWASP's 2026 guide says that semantic filters are evadable by rephrasing or encoding, and that low-resource and code-mixed inputs degrade their accuracy.

Language matters too. The Llama Guard 4 model card says the model has been optimized for English-language text, so other languages need their own testing.

> **Tip:** Asked which tool is best? Don't name one. Say what job it does, where it runs, and who keeps its rules up to date.

## What does the interviewer want to hear?

**A strong answer covers**

- [ ] Three kinds: a safety model, a toolkit and hosted filters.
- [ ] Llama Guard classifies text, and you can fine-tune its risk categories.
- [ ] NeMo Guardrails adds your own rules, and can call other checks.
- [ ] Cloud filters are hosted APIs with harm categories, and some also check personal data.
- [ ] Tools lower the risk. Pair them with least privilege (each tool gets only the access it needs) and real tests.

**Common traps**

- Trap: "Install a guardrail library and the app is safe." Better: A library is one layer. Add limits in code and test with real attempts.
- Trap: "Just turn on the cloud filter and skip testing." Better: Filters miss rephrased attacks. Test the whole chain before launch.
- Trap: "Llama Guard is the one tool we need." Better: It classifies text. It doesn't enforce what a tool may do, so code still checks each action.

## Can you spot the weak point?

**Spot the weak point:** Which setting is the weak point in a claims assistant's guard setup?

A. Input check: cloud filter on, with prompt attacks and personal data flagged.
B. Output check: Llama Guard on, with its risk list tested on real claims messages.
C. Handoff: unsafe drafts sent straight to the customer with no human review.
D. Logs: every block saved and reviewed each week.

**Answer:** C. Unsafe drafts must go to a person, never to the customer. The other three settings each add a check or a record, so they are not the weak point.

**Quick check:** The team needs a safety classifier it can run on its own servers and tune to its own risk categories. Which tool fits best?

A. Llama Guard, run on its own servers and fine-tuned to its own categories
B. A cloud filter on its default settings
C. A longer system prompt
D. A bigger model

**Answer:** A. Llama Guard is an open-weight model you can run yourself and fine-tune to adjust its categories. A longer prompt or a bigger model is not a guardrail.

## Can you answer these from memory?

**Flash cards**

- **What is Llama Guard?** An open-weight safety model from the Llama team that classifies text against risk categories.
- **What is NeMo Guardrails?** An open toolkit from NVIDIA for writing your own rules around an AI app.
- **What are cloud filters?** Hosted checks from AWS, Azure or OpenAI that you call over an API.
- **Can you change Llama Guard's categories?** Yes, by fine-tuning it. The paper says fine-tuning lets you adjust its risk categories.
- **Do guardrail tools stop every attack?** No. They lower the risk, and a rephrased attack can still get past.
- **Can the tools work together?** Yes. NeMo can call Llama Guard as one of its community safety checks.

## Likely follow-up questions

- Q205 Input vs output guardrails? https://designervenkat.online/interview/ai/input-vs-output-guardrails
- Q218 How do you build content moderation? https://designervenkat.online/interview/ai/how-do-you-build-content-moderation
- Q224 What is a policy classifier layer? https://designervenkat.online/interview/ai/what-is-a-policy-classifier-layer
- Q212 How do you detect and redact PII? https://designervenkat.online/interview/ai/how-to-detect-and-redact-pii
- Q232 What is over-refusal? https://designervenkat.online/interview/ai/what-is-over-refusal
- Q225 What is the dual-LLM (quarantine) pattern? (full answer coming)

## Learn it in depth

- [Content Moderation APIs](https://designervenkat.online/learn/ai-engineering/content-moderation-apis)
