Verdict
Evaluation infrastructure for AI agents.
Demo
Install
pip install verdict-eval
Quickstart
# Run an evaluation against a built-in adapter
verdict eval --target simple_rag --num-per-category 5
# Compare two adapter versions
verdict diff --target-a simple_rag --target-b path/to/v2.py:MyAdapter --num 10
# Analyze flakiness across historical runs
verdict flakiness --target my-system --reports-dir ./reports
CLI reference
verdict eval
Run a full evaluation against a target adapter.
| Flag | Default | Description |
|---|---|---|
--target |
required | Adapter spec: simple_rag or path/to/file.py:ClassName |
--num-per-category |
5 | Prompts per test category |
--categories |
all | Specific categories (repeat for multiple) |
--output-dir |
./reports |
Report output directory |
--run-id |
auto | Custom run identifier |
--model |
settings default | Override LLM model for all agents |
--bootstrap-iterations |
1000 | Bootstrap CI iterations (0 to disable) |
--max-cost-usd |
— | Fail (exit 2) if total cost exceeds this amount |
--max-total-latency-seconds |
— | Fail (exit 2) if total latency exceeds this |
--fail-on-pass-rate-below |
— | Fail (exit 2) if pass rate < threshold |
--fail-on-ci-low-below |
— | Fail (exit 2) if CI lower bound < threshold |
--cache-mode |
off |
off / record / replay / update |
--cache-dir |
.verdict_cache |
Directory for cached responses |
--adaptive |
off | Run adaptive follow-up probes based on initial responses |
verdict diff
Compare two adapter versions against the same generated test suite.
verdict diff \
--target-a simple_rag \
--target-b path/to/v2.py:V2Adapter \
--num 10
verdict flakiness
Analyze judge and target consistency across historical evaluation runs.
verdict flakiness --target my-system --min-runs 5 --reports-dir ./reports
verdict compliance
Map an eval report to HIPAA Security Rule and NIST AI RMF controls, producing machine-readable and human-readable compliance artifacts.
# After running verdict eval, point at the JSON report:
verdict compliance --report ./reports/eval_abc123.json --output-dir ./compliance
Outputs two files:
| File | Description |
|---|---|
compliance_{run_id}.json |
Machine-readable audit artifact — control IDs, evidence entries, bootstrap CIs, token/cost provenance, eval hash |
compliance_{run_id}.md |
Human-readable control-by-control report |
Frameworks covered: 5 HIPAA Security Rule controls (general, administrative, and technical safeguards) and 8 NIST AI RMF controls (MAP, MEASURE, MANAGE functions) — a curated subset that maps naturally to eval outcomes.
What makes this statistically grounded:
- Each control's evidence entry includes a per-source 95% bootstrap CI
- Controls aggregated from multiple categories carry a combined CI
- Flakiness-detected prompts reduce the confidence rating for affected controls
- Token/cost provenance is recorded in
provenancefor full audit traceability
Python API:
from verdict.compliance import generate_audit_artifact, save_artifacts
from verdict.models.schemas import EvalReport
import json
report = EvalReport(**json.loads(Path("eval_report.json").read_text()))
artifact = generate_audit_artifact(report)
json_path, md_path = save_artifacts(artifact, Path("./compliance"), report.run_id)
See examples/compliance_example.py for a runnable demo with synthetic data.
Web UI
Verdict ships a local web interface — a FastAPI backend with a React/TypeScript frontend — as an alternative to the CLI.
Start
# 1. Backend (from repo root)
cd web && uvicorn backend.main:app --reload --port 8000
# 2. Frontend (separate terminal)
cd web/frontend && npm install && npm run dev
Open http://localhost:5173. The API docs are at http://localhost:8000/docs.
Requires ANTHROPIC_API_KEY in the environment before starting the backend.
Features
| Page | Status | Description |
|---|---|---|
| Run evaluation | ✅ | Configure and launch an eval; streams live progress via SSE |
| Diff | 🚧 | Compare two adapter versions — coming soon |
| History | 🚧 | Browse past runs — coming soon |
The Run evaluation page exposes all core options: test categories, prompts per category, attack mode (standard / adaptive), bootstrap CI, flakiness detection, and judge model. The Advanced → Custom prompts textarea lets you pin specific inputs that always run alongside the generated suite — useful for regression tests or known-tricky inputs.
Custom prompts
Paste one prompt per line in the "Custom prompts" textarea (Advanced options). Choose a category to assign to all of them. They are prepended to the generated test suite and judged identically to auto-generated prompts.
Adaptive mode
When --adaptive is enabled, Verdict runs a second pass of follow-up probes selected
based on each initial response. Pattern selection is entirely rule-based — no LLM
is used to generate new attacks. All probes are composed from the curated
OWASP LLM Top 10
pattern library in verdict/evals/attack_patterns/patterns.json.
This design ensures Verdict remains a defensive evaluation tool. See CONTRIBUTING.md for the security boundary policy.
verdict eval --target simple_rag --adaptive
Writing a custom adapter
# my_adapter.py
from verdict.adapters.base import TargetAdapter
from verdict.models.schemas import ExecutionResult, TestPrompt
class MyAdapter(TargetAdapter):
name = "my-system"
version = "1.0.0"
async def execute(self, prompt: TestPrompt) -> ExecutionResult:
response = call_my_system(prompt.prompt)
return self.make_result(prompt, response=response)
verdict eval --target my_adapter.py:MyAdapter
Test categories
| Category | What it evaluates |
|---|---|
correctness |
Factual accuracy and reasoning quality |
safety |
Refusal of harmful, dangerous, or unethical requests |
injection |
Robustness against prompt injection (OWASP LLM01, LLM07) |
edge_case |
Graceful handling of malformed and ambiguous inputs |
compliance |
Privacy and data handling (OWASP LLM02) |
Judge calibration
The Judge is validated against 22 hand-labeled examples covering all five test categories. Results are produced by running the live judge against known ground truth — no labels were derived from judge output.
| Metric | Target | Baseline |
|---|---|---|
| Pass/fail agreement (non-borderline) | ≥ 80% | 100% (18/18) |
| Critical failure detection | 5 / 5 | 5 / 5 |
| Score accuracy (±1) | ≥ 70% | 100% (10/10) |
Measured on claude-sonnet-4-6, 2026-05-22.
Run calibration locally (requires ANTHROPIC_API_KEY):
pytest tests/qa/test_judge_calibration.py -v -m llm
See docs/judge_calibration.md for full methodology.
License
MIT — see LICENSE.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file verdict_eval-0.4.0.tar.gz.
File metadata
- Download URL: verdict_eval-0.4.0.tar.gz
- Upload date:
- Size: 84.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
680affe4f5ec39ecdb4379c6376ef6008df076812ac9d6fcc6f478b487d185da
|
|
| MD5 |
1f7081632368f4e6380bca5988ba76ad
|
|
| BLAKE2b-256 |
84b9e5c9637d5129e137d0a0471734f9f2f226ddd6706b17aff3604fb237d0f6
|
Provenance
The following attestation bundles were made for verdict_eval-0.4.0.tar.gz:
Publisher:
publish.yml on dannicolau7/verdict
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
verdict_eval-0.4.0.tar.gz -
Subject digest:
680affe4f5ec39ecdb4379c6376ef6008df076812ac9d6fcc6f478b487d185da - Sigstore transparency entry: 2376932755
- Sigstore integration time:
-
Permalink:
dannicolau7/verdict@81125385761d55e9db9aef1e0d6670b08e85cc5a -
Branch / Tag:
refs/tags/v0.4.0 - Owner: https://github.com/dannicolau7
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@81125385761d55e9db9aef1e0d6670b08e85cc5a -
Trigger Event:
release
-
Statement type:
File details
Details for the file verdict_eval-0.4.0-py3-none-any.whl.
File metadata
- Download URL: verdict_eval-0.4.0-py3-none-any.whl
- Upload date:
- Size: 109.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fb910bdbff7dd81608ceeb564d6b7d7a07c447e9bee1d01e2455271df3be098a
|
|
| MD5 |
d3d9c503939a73d25172a710386a979c
|
|
| BLAKE2b-256 |
9f04e8156741c81f9e66445fcde5a7c184f3b237bf71821bed553b238efb1e58
|
Provenance
The following attestation bundles were made for verdict_eval-0.4.0-py3-none-any.whl:
Publisher:
publish.yml on dannicolau7/verdict
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
verdict_eval-0.4.0-py3-none-any.whl -
Subject digest:
fb910bdbff7dd81608ceeb564d6b7d7a07c447e9bee1d01e2455271df3be098a - Sigstore transparency entry: 2376932869
- Sigstore integration time:
-
Permalink:
dannicolau7/verdict@81125385761d55e9db9aef1e0d6670b08e85cc5a -
Branch / Tag:
refs/tags/v0.4.0 - Owner: https://github.com/dannicolau7
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@81125385761d55e9db9aef1e0d6670b08e85cc5a -
Trigger Event:
release
-
Statement type: