This is an open-sourced custom prompt injection detection module, designed for deployment on AWS.
I built this using personal time/personal money/personal laptop/personal AWS accounts, and it's not connected to my professional employment whatsoever.
You might ask why I'd build this when AWS Bedrock's Guardrails feature offers prompt injection protection. There's a few reasons.
Reason 1: Customization. You can customize Guardrails to a good extent, can tell it what keywords or topics to avoid. But you can't tell it what to expect.
Reason 2: Freedom. With my own prompt injection detection module, I can easily swap Bedrock for something else. And I can do things the way I want them done.
Reason 3: Learning. I'm going down an AI / ML / GenAI / LLM learning pathway. It's wild, and I love doing this stuff.
The repo is MIT licensed, is Python based, has 146 passing unit tests.
Is it perfect? Nope. Can you help make it better? Yup.
Let me know what you think.
https://github.com/wayneworkman/terraform-module-prompt-injection-detection
Top comments (0)