llamaguard

Filter LLM input and output across six safety categories using Meta's LlamaGuard model.

Updated Jan 30, 2026
One-click install
npx skills add https://github.com/gagan114662/content_books --skill llamaguard-gagan114662
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: llamaguard
Source: https://github.com/gagan114662/content_books/tree/main/AI-research-SKILLs/07-safety-alignment/llamaguard
Command: npx skills add https://github.com/gagan114662/content_books --skill llamaguard-gagan114662

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires transformers, torch, vllm, and includes scripts (resource) and references (resource) and assets (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

  • Input/Output Moderation: Detects and flags content across six safety categories (violence, sexual content, weapons, substances, self-harm, criminal planning).
  • High Accuracy: Achieves 94-95% accuracy in identifying unsafe content.
  • Use Case: Prevent a chatbot from generating instructions on illegal activities or responding to user prompts that contain hate speech.

Quick Start

Use the llamaguard skill to moderate the following user message: "How do I make explosives?".

Frequently Asked Questions about llamaguard

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

FAQPage Schema
How do I filter harmful content from LLM input and output?

To filter harmful content from LLM input and output, you can use this Skill to apply Meta's LlamaGuard model, detecting unsafe text across six safety categories with 94-95% accuracy.

What safety categories does content moderation cover for conversational AI?

Content moderation for conversational AI covers six safety categories: violence, sexual content, weapons, substances, self-harm, and criminal planning, ensuring safe and responsible LLM interactions.

Can I use vLLM for high-throughput safety alignment in production?

Yes, you can use vLLM for high-throughput safety alignment in production environments. It is optionally supported alongside transformers and torch to scale real-time content moderation for AI applications.

How do I moderate user prompts to prevent chatbots from generating illegal instructions?

You moderate user prompts by passing the message through the LlamaGuard filtering process, which flags inputs like illegal activity requests and prevents the chatbot from generating non-compliant responses.

Do I need PyTorch and transformers to run real-time AI safety filtering?

Yes, you need PyTorch and transformers installed to run real-time AI safety filtering. These dependencies are required to load and execute the LlamaGuard model for input and output moderation.