PromptShield — open-source prompt injection + hallucinationfirewall for any LLM app

Built a Python middleware that wraps any LLM call with 3 layers:

:police_car_light: Input Guard — blocks prompt injections (DistilBERT, F1: 0.944)
:white_check_mark: Output Guard — catches hallucinations (NLI cross-encoder)
:brain: Memory Layer — persistent agent memory (ChromaDB)

All local models. No API keys. No cost.

pip install neeraj-llmguard

Live demo: Llmguard Demo - a Hugging Face Space by Neeraj-Ch0udhary
GitHub: GitHub - Neeraj-Ch0udhary/promptshield: Open-source prompt injection firewall + hallucination blocker + agent memory layer for any LLM app · GitHub
Model: Neeraj-Ch0udhary/llmguard-input-guard · Hugging Face

Would love feedback from the HF community!

1 Like