Why I Build Tools for LLM Safety

Addressing fragmentation, statistical gaps, and decay in adversarial testing.

Generative AI models are moving from sandboxed experiments into critical production loops. However, our engineering tools for validating their safety, security boundaries, and regression risks remain severely underdeveloped. As an AI Safety Tech Lead, I focus on closing this gap. I design and maintain Reagent, an open-source, provider-agnostic adversarial stress-testing framework built to make LLM applications robust, safe, and ready for continuous deployment.
The Problems in LLM Safety & Evaluation
Problem 01

Fragmented Testing Pipelines

Teams currently stitch together separate tools: one for quality regression, another for adversarial red-teaming, and custom scripts for assertions. There is no single, unified artifact that answers: "Did this model update pass our safety bar?"

Problem 02

Stale Adversarial Corpora

Security libraries hardcoded in proprietary dashboards rot quickly. Adversarial safety requires a community-centric, open-source model where security researchers can continuously contribute and cite patches, similar to CVE feeds.

Problem 03

Statistically Naive Regression Testing

Comparing simple pass rates between model releases is mathematically flawed. A 2% drop on a small dataset is almost always noise; developers waste hours chasing ghosts or completely miss statistically significant safety regressions.

Problem 04

CI/CD Friction & API Exhaustion

Most tools are designed for interactive use. In automated pipelines, they frequently exhaust rate limits or result in massive API billing. Evals must respect strict budget guards and prioritize local, cost-free testing.

My Focus & Active Contribution

Building Reagent: An Open-Source Wedge

To address these limitations, I am building **Reagent** (Apache-2.0). Reagent is a local-first, CI-native toolkit that bundles adversarial stress testing, structured assertion execution, and statistically rigorous diffing into a single lightweight binary.

Curated Fuzz Corpus

YAML templates mapped directly to OWASP LLM Top 10 and MITRE ATLAS, documenting real-world attack vectors with citations.

Statistical Diffing

Applies Wilson Score intervals and McNemar's paired z-test to distinguish actual safety regressions from stochastic noise.

Local-First DevSecOps

Designed to run locally with Ollama adapters. Protects internal IP and keeps testing completely free during dev cycles.

How Reagent Secures the Lifecycle
ADVERSARIAL PROBES REAGENT RUNNER (Async Concurrency) ASSERTIONS (Refusal/Regex) CI EXIT CODE SCORECARD
Real-time Adversarial Fuzzing Flow: Reagent intercepts raw templates, executes them concurrently via Ollama to bypass cloud provider constraints, filters model responses through strict safety assertion engines, and returns discrete exit codes directly to the CI server.
Visualizing Statistical Significance in CI
Standard evaluation tools compare simple pass rates (e.g., delta changes) between runs. Because LLM outputs are stochastic and evaluations are often performed on small sets, this leads to continuous false regressions. Reagent applies McNemar's test and Wilson score intervals to analyze paired changes.
Baseline Run (Pass Rate: 90%) Wilson 95% CI
N = 100
Candidate Run (Pass Rate: 84%) Wilson 95% CI
N = 100
Continuous Analysis:

How it works: The animation illustrates how the confidence interval shrinks as sample size increases from $N=100$ to $N=500$. At smaller sample sizes, the confidence bounds overlap considerably (making the drop statistically insignificant). Once the sample size narrows, the regression is confirmed, triggering a build blockage.

Positioning in the LLM Evaluation Ecosystem
Tool Wedge / Focus Red-Teaming CI/CD Integration Statistical Rigor License
Reagent (My Project) CI/CD rigor & red-team bundle ✓ (Included) ✓ (First-class) ✓ (Wilson / McNemar) Apache-2.0
promptfoo Feature DX for prompt iteration ⚠ (Gated behind paid) ✓ (Good DX) ✗ (Naive Deltas) MIT (Core)
garak Broad vulnerability scanning ✓ (Deep library) ✗ (CLI only) ✗ (None) Apache-2.0
Inspect AI Rigorous academic benchmarking ✗ (Not included) ⚠ (Heavy research focus) ✓ (High) MIT
Toolkit Architecture
Designed using a pluggable, entry-point structure in Python. Click on any component of the evaluation loop below to view its internal design details.
Suite Loader Async Runner Response Cache Provider Adapters Assertion Engines Diff & Reporter

Suite Loader

Loads YAML test suites and resolves YAML $ref files. It executes strict syntactic and semantic validations using Pydantic v2 schemas to ensure case structures conform before running the evaluations.