Skip to main content
Media Evaluator scores audio, image, video, and text outputs from specialised agent pipelines, using multimodal LLM-as-judge for images and text and file checks for audio and video.

Quick Start

1

Grade an agent's text output

Run an agent, then score its output against a text criteria — no file needed:
2

Evaluate an image

Score a generated image against a criteria with a multimodal model:
3

Evaluate audio against expected text

Transcribe a TTS file and compare it to an expected transcript:
4

Auto-detect from a file extension

Let the evaluator pick the branch from the file extension:

How It Works

The evaluator routes the output to one of four branches, either from media_type or by auto-detection. Auto-detection reads the file extension (.mp3/.wav/.ogg/.flac/.m4a → audio, .png/.jpg/.jpeg/.gif/.webp → image, .mp4/.avi/.mov/.webm → video) and the LiteLLM response class (ImageResponse, HttpxBinaryResponseContent, VideoResponse), falling back to text.

Configuration Options

Every field on MediaEvaluator: Methods

Eval Module Reference

Full Python API for the eval package

MediaEvaluationResult

run() returns a MediaEvaluationResult with these fields:

Response Format

The image and text branches ask the model for a SCORE: / REASONING: response and parse it into score and reasoning. See the Judge response format note for the full rules.

Common Patterns

Gate an image-generation agent so only on-brief renders pass:
Auto-detect a mixed pipeline that emits either audio or video:
Add media checks to an EvalSuite run:

Best Practices

Set expected_text when you have a known transcript — the audio branch transcribes and scores word-overlap similarity. Use criteria for image and text branches when the check is subjective (“looks professional”, “reads clearly”).
A codec that writes headers still produces a tiny file on failure. Raise min_file_size above that threshold so silent or blank renders fail the file check instead of passing.
Auto-detection reads by file extension and by LiteLLM response class (ImageResponse, HttpxBinaryResponseContent, VideoResponse). When an output has no extension or an unusual one, set media_type explicitly to pick the right branch.
The image and text branches score 1–10 and pass at ≥ 7.0, matching the threshold used across the eval framework, so mixed suites compare cleanly.

Judge

LLM-as-judge for evaluating outputs

Harness Evaluator

Score harness traces into an EvalSuite report

Context Evaluator

Score multi-agent handoff fidelity

Evaluation

Evaluators, suites, and reports