The pattern
Pass fail_threshold to suite.run(). If the pass rate drops below it, the process exits with code 1 — blocking the deployment.
Save through the save_json / save_html / save_junit_xml kwargs, not
by calling report.save_json(...) on the line after a gated run(). A
failing gate raises EvalGateFailure from inside run(), so statements
after it never execute — exactly the runs whose artifacts you need most.
The kwargs write the report before the gate is evaluated.
GitHub Actions
Speed up CI with parallel workers
Async runner for async model functions
Save and view results
Or get the HTML as a string (useful in notebooks or custom pipelines):
View a saved report from the CLI:
Convert a saved JSON report to HTML:
Run a specific eval file
--html and --json inject environment variables that the suite picks up automatically — no changes to your eval script needed.
Tips
- Keep a golden dataset: a small set of cases (20-50) that cover your most critical behaviors, run on every PR.
- Use tags to split fast deterministic evals (every commit) from slower LLM-judge evals (nightly, or main only).
- Archive
results.json per run as a build artifact so you can track score trends over time.