Skip to main content

EvalWise

Deterministic-first AI evaluation for text, image, audio, and video.

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
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
[video] Video assertions (extra only, no example yet) —
[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

  1. Deterministic by default — Same input, same result. Always.
  2. Cheap first — Check format, length, syntax before calling models.
  3. Grounded scores — Know exactly why something failed.
  4. 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.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for evalwise 0.1.0
File Size Uploaded Provenance Actions
evalwise-0.1.0.tar.gz 66.4 kB Without provenance Details for evalwise-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for evalwise 0.1.0
File Interpreter ABI Platform Actions
evalwise-0.1.0-py3-none-any.whl Python 3 none any Details for evalwise-0.1.0-py3-none-any.whl

Total release size: 90.8 kB

Release files / evalwise-0.1.0.tar.gz

Download URL evalwise-0.1.0.tar.gz
Size 66.4 kB
Tags Source
SHA-256 checksum
How to use checksums
6e8d47244ff9e78f42e287ba9c45ad0366bd2d0fe42e0540219ff3c18d70cd1c
BLAKE2b-256 checksum
How to use checksums
a34dbb948fe7612643b9d4c2b598d5e18c086d26e52552318c5a778c91fdc4f3
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.0-py3-none-any.whl

Download URL evalwise-0.1.0-py3-none-any.whl
Size 24.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
1f3d160cdf29eed7038ef12866d2689f5bac67265a22f505c3745499b7a163af
BLAKE2b-256 checksum
How to use checksums
07d2e75ed280e3c9a3388f20377bb3d9874a2b7c975cc5caf9a17689597e0464
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.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.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page