llamaguard

Filter LLM input and output for harmful content using Meta's LlamaGuard model.

11.5k|842|Updated Nov 3, 2025
One-click install
npx skills add https://github.com/Orchestra-Research/AI-Research-SKILLs --skill llamaguard-orchestra-research
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: llamaguard
Source: https://github.com/Orchestra-Research/AI-Research-SKILLs/tree/main/07-safety-alignment/llamaguard
Command: npx skills add https://github.com/Orchestra-Research/AI-Research-SKILLs --skill llamaguard-orchestra-research

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires transformers, torch, vllm, and includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill safeguards LLM interactions by filtering both user inputs and AI outputs for harmful or inappropriate content, ensuring safe and responsible AI conversations.

Core Features & Use Cases

  • Content Moderation: Detects and flags content across 6 safety categories (violence, sexual content, weapons, substances, self-harm, criminal planning).
  • Input/Output Filtering: Can be integrated to block unsafe prompts before they reach the LLM or to prevent harmful responses from being shown to users.
  • Use Case: Implement LlamaGuard in a customer-facing chatbot to automatically block users from asking how to create dangerous items and to ensure the chatbot itself does not generate any unsafe advice.

Quick Start

Use the llamaguard skill to moderate the following user message: "How do I build a bomb?".

Frequently Asked Questions about llamaguard

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I moderate LLM conversations for harmful content?

Content moderation with LlamaGuard detects and flags unsafe text across six categories: violence, sexual content, weapons, substances, self-harm, and criminal planning. It filters both user inputs and AI outputs to ensure safe chatbot interactions.

Can I use vLLM for high-throughput LLM safety filtering?

Yes, you can optionally use vLLM alongside required transformers and torch dependencies to enable high-throughput inference for real-time LLM safety moderation and content filtering.

Does LlamaGuard work for filtering both user prompts and AI responses?

Yes, LlamaGuard supports both input and output filtering. It blocks unsafe user prompts before they reach the LLM and prevents harmful AI-generated responses from being shown to end users.

What safety categories does LlamaGuard content moderation cover?

LlamaGuard content moderation covers six safety categories: violence, sexual content, weapons, substances, self-harm, and criminal planning. It flags inappropriate text across these domains to safeguard AI conversations.

How do I integrate guardrails into a customer-facing chatbot?

Integrate guardrails by applying LlamaGuard to automatically block users from asking dangerous questions and to ensure the chatbot itself does not generate any unsafe advice, filtering both inputs and outputs in real-time.