Inspiration

Enterprises are terrified of deploying LLMs into production. While working on medical ML research (specifically analyzing ACL injuries), I realized that standard RAG pipelines are dangerously fragile. They rely on probabilistic prompt engineering ("Please don't hallucinate"), which is easily bypassed by adversarial injections and jailbreaks. I wanted to build a system that treats LLM safety not as a language problem, but as a deterministic, mathematical firewall. The inspiration for ClaimGate was to create a security infrastructure that highly regulated industries (like healthcare and finance) can actually trust.

What it does

ClaimGate Enterprise is a 4-stage AI defense pipeline that intercepts, routes, and mathematically verifies generative grounding before a user ever sees the output.

L1 (Anomaly Detection): Intercepts out-of-domain (OOD) prompt injections at the vector level.

L2 (Intent Routing): Deterministically triages sensitive queries (e.g., billing, PII) to human agents.

L3 (Context Optimization): Dynamically packs the RAG context window.

L4 (Grounding Verification): Cross-examines the LLM's output against the source truth to ensure zero hallucinations.

How we built it

We moved away from traditional heuristic filters and implemented a rigorous mathematical approach.For the L1 Gate, we calculate the Mahalanobis distance to identify semantic anomalies. Given a query vector $x$, the distribution mean $\mu$, and the covariance matrix $\Sigma$, the distance is computed as:$$D_M(x) = \sqrt{(x - \mu)^T \Sigma^{-1} (x - \mu)}$$If the distance exceeds our strict security threshold, the connection is severed pre-generation.The L2 Gate utilizes a WideMLP classifier for ultra-low latency intent routing. Finally, the L4 Gate employs Natural Language Inference (NLI) to calculate an entailment score, guaranteeing the output is bounded by the retrieved context. The frontend was built using HTML, Tailwind CSS, and JavaScript, designed with a "Tactical Cyber-Ops" aesthetic to simulate a real-time Enterprise Security Operations Center (SOC).

Challenges we ran into

The primary challenge was the "Latency vs. Security" trade-off. Running multiple verification gates can easily bottleneck the user experience. We had to heavily optimize the L1 vector math to execute in milliseconds, ensuring that trivial attacks are dropped instantly before they consume expensive LLM compute. Additionally, shifting the UI paradigm from a generic "chat interface" to an interactive "Tactical Security Dashboard" required complex state management to animate the metric gauges and terminal logs accurately in real-time.

Accomplishments that we're proud of

-Successfully replacing probabilistic "guardrail prompts" with a deterministic mathematical firewall.

-Implementing complex vector-space geometry (Mahalanobis) directly into the security flow.

-Designing a highly interactive frontend that visually communicates the L1-L4 pipeline, providing an "audit trail" that enterprise clients require.

-Building an architecture that doesn't just act as an LLM wrapper, but as a standalone, defensible security product.

What we learned

True LLM safety lies in vector-space geometry, not just natural language filtering. Understanding how to apply statistical outlier detection to high-dimensional embedding spaces was a massive breakthrough. From a product perspective, I learned the importance of "Security UX"—how visual feedback (like anomaly delta bars and CRT terminal scanlines) builds critical trust when deploying black-box AI systems.

What's next for ClaimGate Enterprise

The immediate next step is adapting ClaimGate to ingest and protect massive, domain-specific enterprise knowledge bases (like comprehensive technical support documentation). We plan to refine the L3 gate using Multi-Objective Knapsack Problem (MMKP) algorithms for perfect context packing, and introduce automated Red-Teaming (via Consensus-AI debate protocols) to continuously stress-test our Mahalanobis thresholds against zero-day prompt injections.

Built With

Share this project:

Updates