Shield Chat Guard
Status: Live.
Your muse
Rebuild ofImplementing Llama Protections in GenAI applications (opens in a new tab)Reframe
Put a safety check in front of my chatbot that blocks jailbreaks and explains why. This rebuilds Meta's video "Implementing Llama Protections in GenAI applications" (https://dev.meta.ai/llama/resources/videos/implement-llama-protections-to-genAI-applications) on current Muse models. It demonstrates: Safeguards for content moderation, jailbreak defense and code security. Plan: A safety check in front of a chatbot that screens prompts and replies with Spark 1.3 and shows why something was blocked. Meta's open protection models stay the self-hosted option.
Checks passed

The plan: Shield Chat Guard
Safety check in front of chat that blocks jailbreaks and explains why.
- Type a test prompt into the chat box
- Review the prompt safety check with category and reason
- Read the chatbot reply if allowed or the block notice if denied
- Review the reply safety check and copy the safety log
See the full plan
Who it's for
Developers and students adding a simple safety check to a demo chatbot.
How it works
- Type a test prompt into the chat box
- Review the prompt safety check with category and reason
- Read the chatbot reply if allowed or the block notice if denied
- Review the reply safety check and copy the safety log
Screens
- Guarded chat. Type prompts, see allow or block badges, and read safe replies with reasons.
- Safety log. Review each prompt and reply check with categories, reasons, and rewrite tips.
- Guard settings. Choose strictness, toggle code caution, and view the self hosted option note.
What goes in
- Text: A chatbot test prompt of a few sentences that may include a jailbreak attempt.
What comes out
- Text: Allow or block verdict with risk categories and a short plain reason.
- Text: Chatbot reply when safe, or a blocked message with a safer rewrite suggestion.
Models
Model Used for Why Muse Spark 1.3 Screen prompts and replies for jailbreaks, unsafe content and risky code and generate the chatbot answer with reasons Reads text and returns structured safety verdicts plus chat replies in one gateway model Limits
- Rebuild fit: reframe. The original video used Llama protection models for moderation, jailbreak defense and code security. This rebuild keeps the same safety job but implements prompt and reply checks plus chat with Spark 1.3 and leaves open protection models as a self hosted option.
- Spark checks are heuristic and can miss novel jailbreaks or flag safe text.
- Code safety review is basic pattern screening, not full static analysis or a security guarantee.
- Chat history and safety logs stay in the browser only.
From your inspo
Rebuild of the Meta developer video Implementing Llama Protections in GenAI applications. It keeps the safeguard demo as a Spark 1.3 safety check in front of a chatbot that blocks jailbreaks and explains why.
Takes
- The job of screening chatbot prompts and replies for moderation issues and jailbreaks
- The before and after flow of check prompt, check reply, then allow or block
- The explainer tone that shows why something was blocked
Leaves out
- Video footage from the original developer video
- Script and narration from the video
- Meta and Llama names and logos
Cost per run: about $0.01 (est.). About 2600 input tokens at $1.25 per million is $0.0033 plus about 1500 output and reasoning tokens at $4.25 per million is $0.0064 for a total of about $0.01 per run.
Recorded demo Done.
npm run verifyexits 0, all 5 tests pass.