Here is a complete, well-formatted Markdown story you can copy and paste directly into your submission form!
Inspiration
As AI pipelines and Large Language Models (LLMs) become deeply integrated into enterprise applications, a massive new attack surface has emerged. We kept seeing headlines about prompt injections, jailbreaks, and sensitive data exfiltration where attackers manipulated AI systems to leak company secrets or bypass safety guardrails.
We realized that while traditional web apps have WAFs (Web Application Firewalls), AI pipelines lacked a dedicated, real-time security layer. Vector databases are particularly vulnerable because if malicious instructions or poisoned data get embedded and stored, they can continuously corrupt RAG (Retrieval-Augmented Generation) responses. This inspired us to build VectorGuard AI—a proactive security shield designed to detect and sanitize adversarial inputs before they ever reach a vector database or LLM.
What it does
VectorGuard AI acts as a smart middleware for your AI applications. Whenever a user submits a prompt, VectorGuard intercepts and scans it in real-time. It uses a combination of semantic evaluation and rule-based checks to detect:
- Prompt Injections: Attempts to override the system prompt.
- Jailbreaks: Sophisticated attacks designed to bypass ethical or safety constraints.
- Data Exfiltration: Attempts to extract sensitive PII or internal system information.
- Adversarial Instructions: Malicious payloads hidden in seemingly benign text.
If an attack is detected, the prompt is immediately blocked, logged in a secure database, and flagged on an intuitive developer dashboard. Clean prompts are passed through seamlessly.
How we built it
We architected VectorGuard AI with a modern, high-performance tech stack focused on speed and reliability:
Backend:
- Built entirely in Python using FastAPI for blazing-fast, asynchronous API handling.
- We used ChromaDB as our local vector database for storing and querying embedding data quickly without external network latency.
- For our semantic scanning engine, we integrated the OpenAI/Anthropic SDKs, leveraging models like GPT-4o-mini and Claude Haiku for fast, cost-effective threat detection.
- We implemented SQLite (via
aiosqlite) to maintain a lightweight, zero-configuration audit log of all security alerts.
Frontend:
- The developer dashboard was built with TypeScript and React 18 (powered by Vite).
- We used Tailwind CSS and shadcn/ui to create a clean, accessible, and premium-looking interface where developers can monitor blocked attacks and system health.
- We utilized Recharts to visualize attack trends and analytics over time.
Challenges we ran into
- Latency vs. Security Trade-off: The biggest challenge in building security middleware is ensuring it doesn't slow down the main application. We had to heavily optimize our async FastAPI routes and carefully select our semantic evaluation models (like GPT-4o-mini) to ensure scans happen in milliseconds.
- Defining "Malicious": Differentiating between a complex, legitimate query and a subtle prompt injection is difficult. We had to iterate extensively on our system prompts and evaluation criteria to minimize false positives while maintaining strict security.
- Local Fallbacks: We wanted the project to work reliably even in air-gapped environments or without premium API keys. Building out the fallback logic to use local
sentence-transformersmodels required careful abstraction in the backend code.
Accomplishments that we're proud of
- Real-time interception: Successfully building a system that can accurately detect and block a jailbreak attempt in under a few hundred milliseconds.
- The Developer Experience (DX): We are incredibly proud of the clean, intuitive React dashboard. Security tools are often clunky, but we managed to make VectorGuard's interface modern, responsive, and easy to read at a glance.
- Seamless Architecture: Successfully integrating FastAPI, ChromaDB, and our React frontend into a cohesive, easily deployable Docker environment.
What we learned
- AI Security is Nuanced: Traditional regex and keyword blocking is insufficient for securing LLMs. We learned how essential semantic understanding is for detecting zero-day prompt injections.
- FastAPI's Async Power: We deepened our understanding of Python's
asyncioand how critical it is for handling multiple LLM API calls simultaneously without blocking the main thread. - Component-Driven UI: Using
shadcn/uiand Tailwind taught us how much faster frontend development can be when you have a rock-solid, accessible component foundation.
What's next for VectorGuard AI
- Official SDKs: We want to build native Python (
pip) and Node.js (npm) SDKs, as well as LangChain/LlamaIndex middleware, so developers can drop VectorGuard into their codebases with just two lines of code. - Custom Rules Engine: Allowing developers to write custom YARA-style rules or regex patterns specific to their business (e.g., blocking specific internal project codenames).
- Webhooks & SIEM Integration: Adding the ability to automatically forward security alerts to tools like Datadog, Splunk, or Slack in real-time.
Built With
- anthropic
- chromadb
- docker
- fastapi
- openai
- pytest
- python
- react
- recharts
- sqlite
- tailwindcss
- typescript
- vite
Log in or sign up for Devpost to join the conversation.