# Llama Guard

> Canonical: https://skillalmanac.com/glossary/llama-guard | Last verified: 2026-11-25 | Index status: index-eligible

Llama Guard is Meta’s safeguard-model family for classifying prompts and conversational responses against specified safety-risk categories.

## In plain language

Llama Guard evaluates conversational text and returns a safety classification. It can classify a user prompt or judge an assistant response with the user message included as context. Released versions have documented default taxonomies, while the prompt can specify customized categories and descriptions. Effectiveness with a modified taxonomy must be evaluated rather than assumed. Separate safeguard inference consumes computing resources and can add latency, which should be measured in the intended deployment.

## Technical definition

The original Llama Guard paper describes a Llama 2 7B model instruction-tuned for prompt and response classification. Meta’s Llama Guard 3 documentation separates an 8B text model, a 1B text model and an 11B-Vision model that evaluates image-plus-text input rather than images alone. The default prompt lists S1–S13 categories. Meta directs users needing the S14 Code Interpreter Abuse category to the 8B model because the 1B variant was not optimized for it. Output is “safe” or “unsafe” followed by violated category identifiers.

## How it shows up when you use agents

Llama Guard is a separate safeguard model that can be placed around a conversational system. For input classification, the application formats the user message using the documented prompt structure. For response classification, Meta’s format includes both the user message and the agent response because the request supplies context for evaluating the reply. The documented output begins with `safe` or `unsafe`; an unsafe result is followed by category identifiers.

That verdict is information for the application’s policy layer. An application might use it when deciding whether to allow content, request another review or stop a workflow, but those downstream choices are not Llama Guard capabilities and do not prove that a hazard has been resolved. Separate safeguard inference also consumes resources and can add latency. Measure that effect in the intended system rather than assuming a particular cost or delay.

Version boundaries matter. The original paper describes a Llama 2 7B model tuned for prompt and response classification. Meta’s Llama Guard 3 documentation distinguishes a 1B text model, an 8B text model and an 11B-Vision model. The vision variant evaluates an image together with text, is not designed for image-only classification and has additional documented limitations. Meta directs deployments needing the S14 Code Interpreter Abuse category to the 8B model because the 1B model was not optimized for it.

A practical next action is to create an evaluation set from the policy the application must enforce. The supplied eval-set skill can validate case structure, graders, duplication and label balance. It does not run Llama Guard or establish that expected labels are correct; those labels need a documented policy or reviewed reference, followed by a separate model evaluation.

## Common confusions

- **Llama Guard versus Llama.** Llama is the underlying general-model line; Llama Guard releases are tuned for safeguard classification.
- **Default taxonomy versus custom prompt categories.** Released models have documented training taxonomies, while prompts can specify other categories. Performance after customization must be tested.
- **Text versus vision variants.** The 11B-Vision model evaluates image-plus-text input; its behavior should not be generalized to the 1B or 8B text models.
- **Classifier versus complete protection.** The 8B model page documents limitations and susceptibility to adversarial or prompt-injection attacks. A classification result is one control, not a safety guarantee.

## Worked examples in this catalogue

### [llm-eval-test-sets](https://skillalmanac.com/skills/skill-almanac/llm-eval-test-sets)

Status: illustrative example from the item's own documentation, not executed for this page.

What you see: Illustrative evaluation preparation: build and structurally validate labeled safety-classification cases, including typical, edge, adversarial and unanswerable prompts with explicit graders.

Why it exercises the concept: The cases can later be used in a separate Llama Guard evaluation. Expected labels must come from a documented policy or reviewed reference; the skill does not run Llama Guard, verify label truth, compute metrics or certify safety.

## Related terms

- [Guardrails](https://skillalmanac.com/glossary/guardrails.md)
- [Llama (Meta)](https://skillalmanac.com/glossary/llama.md)
- [AI safety](https://skillalmanac.com/glossary/ai-safety.md)
- [Classification](https://skillalmanac.com/glossary/classification.md)
- [Prompt injection](https://skillalmanac.com/glossary/prompt-injection.md)
- [Jailbreak](https://skillalmanac.com/glossary/jailbreak.md)

## Sources

- [Llama Guard: LLM-based Input-Output Safeguard for Human-AI Conversations](https://arxiv.org/abs/2312.06674), arXiv (Inan et al., Meta) (accessed 2026-11-25)
- [Llama Guard 3 model card and prompt format](https://dev.meta.ai/llama/docs/model-cards-and-prompt-formats/llama-guard-3/), Meta (accessed 2026-11-25)
- [Llama-Guard-3-8B](https://huggingface.co/meta-llama/Llama-Guard-3-8B), Hugging Face (model page) (accessed 2026-11-25)

Definitions are written by Skill Almanac from the sources above and checked against them on 2026-11-25. [Glossary index](https://skillalmanac.com/glossary.md).
