> This page is for version 1.10.1 (default).
> For other versions, use one of these documentation indexes:
> - 1.10.1 (default): https://docs.nvidia.com/nim/llama-3-1-nemoguard-8b-contentsafety/1.10.1/llms.txt
> - 1.0.0: https://docs.nvidia.com/nim/llama-3-1-nemoguard-8b-contentsafety/1.0.0/llms.txt

> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.nvidia.com/nim/llama-3-1-nemoguard-8b-contentsafety/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.nvidia.com/nim/llama-3-1-nemoguard-8b-contentsafety/_mcp/server.

# Prompt Templates

> Llama 3.1 NemoGuard 8B ContentSafety NIM performs content safety checks for user input and LLM response output. The checks can ensure that the dialog input and output are consistent with rules specifi

Llama 3.1 NemoGuard 8B ContentSafety NIM performs content safety checks for user input and LLM response output.
The checks can ensure that the dialog input and output are consistent with rules specified as part of the system prompt.

The prompt template for content safety consists of the following key sections:

**Task**

The task provides the instruction to the model to perform content moderation.
In the sample prompts provided by NVIDIA, the task includes a list of unsafe content categories.
The task instructs the LLM to identify if the content violates the safety policy and if the content belongs to any of the unsafe content categories.

**Conversation**

The conversation includes the user input that the LLM is instructed to moderate.

**Response Instruction**

The response instruction instructs the LLM to assess the conversation.
In the sample prompts provided by NVIDIA, the instruction specifies to classify the user safety, response safety, and the violated unsafe content categories.
The sample prompts also instruct the LLM to format the response as JSON only.