Built a Python middleware that wraps any LLM call with 3 layers:
Input Guard — blocks prompt injections (DistilBERT, F1: 0.944)
Output Guard — catches hallucinations (NLI cross-encoder)
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!