EvalWise
Deterministic-first AI evaluation for text, image, and audio.
The eval SDK that doesn't default to "ask another AI if this is good."
pip install evalwise
Why EvalWise?
Most eval tools jump straight to LLM-as-judge. That's:
- Expensive — every eval is another API call
- Non-deterministic — same input, different scores
- Ungrounded — "Score: 4/5" tells you nothing
EvalWise flips the default: deterministic checks first, LLM-judge only when you have to.
Quick Start
from evalwise import Suite, Assert
suite = Suite("summarization")
@suite.test
def test_format(response: str):
Assert.bullet_count(response, exactly=3)
Assert.word_count(response, max=200)
Assert.json_valid(response)
@suite.test
def test_factuality(response: str, source: str):
Assert.entails(response, source=source)
Assert.no_contradiction(response, source=source)
# Run against a dataset
results = suite.run(dataset="./golden_set.json")
results.assert_pass_rate(threshold=0.95)
CLI
# Run eval suite
evalwise run tests/test_summary.py --dataset golden.json
# Run in CI (exit code 1 on failure)
evalwise run tests/ --ci --threshold 0.95
# Create sample eval file
evalwise init
Text Assertions
| Assertion | What it checks |
|---|---|
contains(text, substring) |
Substring present |
not_contains(text, substring) |
Substring absent |
regex(text, pattern) |
Pattern match |
json_valid(text) |
Parseable JSON |
json_schema(text, schema) |
Matches JSON schema |
word_count(text, min, max) |
Word count in range |
bullet_count(text, exactly) |
Bullet point count |
readability(text, min_score) |
Flesch Reading Ease |
language_is(text, "en") |
Correct language |
code_parses(text, "python") |
Valid syntax |
code_runs(text) |
Executes without error |
entails(text, source) |
Follows from source (NLI) |
no_contradiction(text, source) |
No contradictions |
embedding_similarity(text, ref) |
Semantic similarity |
urls_valid(text) |
All URLs return 2xx |
Image Assertions
Image evals cover prompt alignment, object detection, resolution/aspect ratio, NSFW safety, and similarity. Object detection uses YOLO via ultralytics.
from evalwise.image import ImageAssert
# Prompt alignment with CLIP
ImageAssert.clip_score(image, "a cat on a couch", threshold=0.25)
# Object detection
ImageAssert.contains_object(image, "cat", confidence=0.5)
ImageAssert.object_count(image, "person", exactly=2, confidence=0.5)
# Metadata
ImageAssert.resolution_is(image, width=1024, height=1024)
ImageAssert.resolution_min(image, width=512, height=512)
ImageAssert.aspect_ratio(image, ratio=1.0, tolerance=0.1)
ImageAssert.format_is(image, "PNG")
# Safety
ImageAssert.nsfw_below(image, threshold=0.1)
# Similarity to a reference image
ImageAssert.image_similarity(image, reference, threshold=0.8)
Image generation example
examples/test_image_generation.py shows a complete eval suite. The dataset can include per-image thresholds and object lists:
{
"image_path": "./examples/sample_cat.jpeg",
"prompt": "a person sitting on a couch with a dog and a cat",
"min_width": 200,
"min_height": 100,
"required_objects": ["dog"],
"confidence": 0.25
}
Audio Assertions
Audio assertions that use Whisper (transcription_contains, transcription_equals, language_is) require ffmpeg to be installed on your system in addition to the evalwise[audio] Python dependencies.
from evalwise.audio import AudioAssert
AudioAssert.transcription_contains(audio, "hello world")
AudioAssert.transcription_equals(audio, expected_text)
AudioAssert.language_is(audio, "en")
AudioAssert.duration_between(audio, min_sec=5, max_sec=30)
AudioAssert.sample_rate_is(audio, hz=44100)
AudioAssert.no_silence(audio, max_silence_sec=1.0)
Installation
# Core (text assertions)
pip install evalwise
# With image support (quote extras for zsh)
pip install "evalwise[image]"
# With audio support (also requires ffmpeg system binary)
pip install "evalwise[audio]"
# On macOS: brew install ffmpeg
# On Ubuntu: sudo apt install ffmpeg
# On Windows: winget install Gyan.FFmpeg
# Everything
pip install "evalwise[all]"
What each extra gives you
| Extra | Capabilities enabled | Example tests |
|---|---|---|
| (none) | 22 of 25 text assertions | test_basic.py |
[nli] |
Assert.entails, Assert.no_contradiction |
test_summarization.py |
[embeddings] |
Assert.embedding_similarity |
— |
[image] |
CLIP, YOLO object detection, NSFW, resolution, similarity | test_image_generation.py |
[audio] |
Whisper transcription, language, duration, sample rate | test_audio.py |
[all] |
All of the above | — |
System dependencies
Some examples also require system binaries:
| Capability | System binary | Install |
|---|---|---|
| Audio transcription | ffmpeg |
brew install ffmpeg / apt install ffmpeg |
Philosophy
- Deterministic by default — Same input, same result. Always.
- Cheap first — Check format, length, syntax before calling models.
- Grounded scores — Know exactly why something failed.
- LLM-judge as last resort — Only for truly subjective criteria.
Comparison
| EvalWise | Promptfoo | Braintrust | LangSmith | |
|---|---|---|---|---|
| Deterministic-first | ✓ | Partial | ✗ | ✗ |
| Image/Audio evals | ✓ | ✗ | ✗ | ✗ |
| Python-native | ✓ | YAML | SDK | SDK |
| No account required | ✓ | ✓ | ✗ | ✗ |
| OSS | ✓ | ✓ | Partial | ✗ |
License
MIT
Metadata
Release files for evalwise 0.1.1
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 |
|---|---|---|---|---|
| evalwise-0.1.1.tar.gz | 66.4 kB | Without provenance | Details for evalwise-0.1.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| evalwise-0.1.1-py3-none-any.whl | Python 3 | none | any | Details for evalwise-0.1.1-py3-none-any.whl |
Total release size: 90.7 kB
Release files / evalwise-0.1.1.tar.gz
| Download URL | evalwise-0.1.1.tar.gz |
|---|---|
| Size | 66.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
089e02d515164f546ccea41472a446e94c96c261c92fdb98246b2b1ad3755068
|
|
BLAKE2b-256 checksum How to use checksums |
90f047ac4e573bcf8bd650996eaa230a696aed24dcaa75204b125ccfb331ed6f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.11.8
|
Release files / evalwise-0.1.1-py3-none-any.whl
| Download URL | evalwise-0.1.1-py3-none-any.whl |
|---|---|
| Size | 24.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
a05ecf4025face98e60ab72fbec372d72438e796194ef0e1dee86308f43c0771
|
|
BLAKE2b-256 checksum How to use checksums |
46de041b13eb75c2d03ff62716f41e5273fbc8df39f7704cc8e8b9cf7f68ad07
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.11.8
|
Security for evalwise 0.1.1
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.