CI for LLM JSON outputs - Validate, test, and measure LLM outputs
Project description
aicert
Reliability tooling for structured LLM outputs.
Measure, validate, and enforce JSON stability in CI.
Why aicert?
LLMs are probabilistic systems.
If your application depends on structured JSON generated by an LLM, that output becomes an implicit contract within your system. Model updates, prompt changes, or configuration tweaks can cause that contract to drift — often without immediate visibility.
Traditional tests typically validate a single run. They do not measure variability across repeated executions.
Aicert treats LLM output like any other production dependency:
- Validate against a JSON Schema
- Measure stability across repeated runs
- Track latency and variability
- Enforce reliability thresholds in CI
Instead of assuming structured outputs remain stable, you can verify that they do.
What It Enables
Aicert helps you:
- Detect schema breakage before deployment
- Quantify output variability across runs
- Catch regressions caused by model or prompt changes
- Enforce reliability standards automatically in CI
- Treat prompts and structured outputs as testable infrastructure
It converts non-deterministic behavior into measurable signals.
Who It’s For
Aicert is designed for teams shipping structured LLM outputs into production systems:
- Backend APIs powered by LLMs
- Extraction and classification pipelines
- Decision-support systems
- Any workflow where JSON output drives downstream logic
If structured LLM output is part of your system contract, Aicert provides guardrails.
Installation
pip install aicert
For development:
pip install -e .
What It Measures
- Compliance — % of outputs matching JSON Schema
- Stability — % of identical outputs across repeated runs
- Latency — P50 / P95 response times
- Similarity — Structural or semantic similarity
- CI Gating — Threshold-based pass/fail enforcement
Basic Workflow
1. Create aicert.yaml
project: my-project
providers:
- id: openai-gpt4
provider: openai
model: gpt-4
temperature: 0.1
prompt_file: prompt.txt
cases_file: cases.jsonl
schema_file: schema.json
runs: 50
concurrency: 10
timeout_s: 30
validation:
extract_json: true
allow_extra_keys: false
thresholds:
min_stability: 85
min_compliance: 95
p95_latency_ms: 5000
ci:
runs: 10
save_on_fail: true
2. Run Stability Tests
aicert stability aicert.yaml
3. Enforce in CI
aicert ci aicert.yaml
Non-zero exit codes indicate threshold failures.
Commands
aicert init
aicert doctor aicert.yaml
aicert run aicert.yaml
aicert stability aicert.yaml
aicert compare aicert.yaml
aicert ci aicert.yaml
aicert diff <run_a> <run_b>
aicert report <run_dir>
Aicert Pro
Aicert Pro turns measurement into enforcement.
The core package tells you how your LLM behaves. Pro defines what behavior is acceptable — and blocks regressions automatically.
When structured outputs drive production systems, “informational metrics” are not enough. You need a reliability boundary.
Aicert Pro adds:
- Baseline locking — capture a known-good state
- Regression enforcement — fail CI when stability or compliance degrades
- Schema and prompt drift detection — detect structural changes immediately
- Cost regression limits — prevent silent cost creep
- Policy-backed CI gating — enforce standards across commits
Pro is designed for teams that treat LLM output as production infrastructure.
What Changes With Pro?
Without Pro:
You measure stability. You review results manually. Regressions can slip through if thresholds are ignored.
With Pro:
Known-good behavior is locked. Deviations are compared automatically. CI fails when output contracts drift. Reliability becomes enforceable policy. Pro moves you from observation to control.
Installing Aicert Pro
After purchasing a subscription:
pip install aicert-pro
Set your license key:
export AICERT_LICENSE="your_signed_license_key"
Verify:
aicert-pro license verify
Use baseline enforcement:
aicert-pro baseline save aicert.yaml
aicert-pro baseline check aicert.yaml
Licensing
Aicert Pro uses signed offline license keys.
- No SaaS dependency
- No account login
- CI-friendly
- Time-limited per subscription
Pricing
- $29 / month
- $290 / year (2 months free)
Purchase: https://mfifth.github.io/aicert/
Questions: mfifth@gmail.com
GitHub Actions Example
- run: pip install aicert
- run: aicert ci aicert.yaml
env:
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
Pro enforcement in CI:
- run: pip install aicert-pro
- run: aicert-pro baseline check aicert.yaml
env:
AICERT_LICENSE: ${{ secrets.AICERT_LICENSE }}
Exit Codes
| Code | Meaning |
|---|---|
| 0 | Success |
| 2 | Threshold failure |
| 3 | Config/schema error |
| 4 | Provider/auth error |
| 5 | License error (Pro only) |
License
Core package (aicert) is MIT licensed.
Aicert Pro is commercial software.
Project details
Release history Release notifications | RSS feed
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 aicert-0.1.0.tar.gz.
File metadata
- Download URL: aicert-0.1.0.tar.gz
- Upload date:
- Size: 56.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
68669af4e91ab43aeea95c053dccfa63a0c11b7c3df5e17d2023a5f1b3dd25ab
|
|
| MD5 |
3dfeae4c57d7f5269cff5ac5ad06dbb4
|
|
| BLAKE2b-256 |
c23a48294ff61cb2a860375f84ecfac71bedac61674ec76cfcbea9c5785cfb9a
|
File details
Details for the file aicert-0.1.0-py3-none-any.whl.
File metadata
- Download URL: aicert-0.1.0-py3-none-any.whl
- Upload date:
- Size: 43.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d1e450011aebbc5a90b0baefc0e99e33bbc19a17a902a73f096145c066098e67
|
|
| MD5 |
bf50ce6eae445f607698f714f83ff983
|
|
| BLAKE2b-256 |
7d33dca9a724a3014d1f1b8e86eaf31dbb4ef02c5b55f6eb38a0d8130cd2f84d
|