regress
Dead-simple regression testing for LLM prompts, built for CI. One YAML file in your repo; prompt breakages fail the build like broken unit tests.
pip install regress-llm
regress init # writes a starter regress.yaml
regress run # runs your prompt tests
Why
You changed a prompt. Or swapped models. Did anything break? Right now you find out from customers. regress catches it on the PR instead.
Unlike heavyweight eval platforms, there's nothing to adopt: no dashboard to learn, no SDK to integrate. Just a YAML file and a GitHub Action.
5-minute quickstart
- Install:
pip install 'regress-llm[openai]'(or[anthropic], or[all]) - Set your key:
export OPENAI_API_KEY=... regress initand edit the generatedregress.yamlregress run
No key handy? Use provider: mock with mock_response on a test to try the harness with zero setup (see the repo's own regress.yaml).
The YAML schema
version: 1
defaults:
provider: openai # openai | anthropic | mock
model: gpt-4o-mini
temperature: 0
judge_model: gpt-4o # model used for llm_judge (defaults to `model`)
max_tokens: 512
tests:
- name: refund_answer_uses_policy
prompt: |
You are a support bot. Answer using ONLY this policy:
{policy}
Customer: {question}
inputs:
policy: "Refunds within 30 days."
question: "Can I get a refund?"
assert:
- contains: "30 days" # substring must appear
- not_contains: "cannot" # substring must NOT appear
- regex: "\\$\\d+" # regex must match
- equals: "exact text" # exact match after stripping
- max_words: 50 # output word count cap
- llm_judge: # ask a model whether the output meets a criterion
criteria: "The answer approves the refund and cites the policy"
Any test can override provider, model, or temperature individually. {placeholders} in prompt are filled from inputs (escape literal braces as {{ / }}).
CLI
regress run [--config regress.yaml] [--format terminal|markdown|json]
[--output report.md] [--fail-fast]
regress init [--force]
Exit codes: 0 all passed, 1 failures, 2 config error — so CI fails the check on regressions automatically.
GitHub Action
This repo dogfoods itself: .github/workflows/regress.yml runs the suite on every PR and comments a Markdown report. To use it in your repo:
- run: pip install regress-llm
- run: regress run --format markdown --output regress-report.md
env:
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
Roadmap
- Baseline diffs: compare against the last green run, not just assertions
- Flaky detection: re-run failures N times before calling them real
- RAG-aware assertions: faithfulness / citation checks against retrieved context
- Hosted: history, trends, and alerts across runs (the paid tier)
Contributing
PRs welcome. Run the mock suite before pushing: python -m regress run.
Metadata
Release files for regress-llm 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| regress_llm-0.1.0.tar.gz | 10.3 kB | Without provenance | Details for regress_llm-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| regress_llm-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for regress_llm-0.1.0-py3-none-any.whl |
Total release size: 21.3 kB
Release files / regress_llm-0.1.0.tar.gz
| Download URL | regress_llm-0.1.0.tar.gz |
|---|---|
| Size | 10.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
904e7245c33c9c407bed95a3d1ec14a5214927f6672b6819951a887576c1fc7d
|
|
BLAKE2b-256 checksum How to use checksums |
28005427be8a8f6c4bf41d2027f0cb5b2949d1d28a4433db032b5196ee0a6a9e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.9.4
|
Release files / regress_llm-0.1.0-py3-none-any.whl
| Download URL | regress_llm-0.1.0-py3-none-any.whl |
|---|---|
| Size | 11.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
04da7ebf7823e46a52523d7fc81600d17a12632fa26bbfcb7ac6f4f7281b3820
|
|
BLAKE2b-256 checksum How to use checksums |
9a40f97ee26e4d9d5b4adb2884f6b40c15bca6bd6e45c09b4d147626bb37b706
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.9.4
|
Security for regress-llm 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.