Skip to main content
EvalResult is the immutable data structure that represents a completed evaluation.

Schema

Fields

input (required)

The input provided to the system under test.
Can be any type: string, dict, list, etc.

output (required)

The output produced by the system.

reference (optional)

The expected or reference output for comparison.

scores (optional)

List of Score objects representing evaluation metrics.

error (optional)

Error message if the evaluation failed with an exception.

latency (optional)

Execution time in seconds. Automatically measured by EZVals.

metadata (optional)

Custom metadata for filtering and analysis.

trace_data (optional)

Debug and trace information. Not displayed in main UI views.

Creating Results

From EvalContext

The typical way—let EvalContext build it:

Direct Construction

For batch operations or custom flows:

Multiple Results

Return a list from an evaluation:

Accessing Fields

Results are immutable after creation:

Serialization

Results serialize to JSON automatically:

Status Determination

A result is considered “passed” if any score has passed=True:
The pass/fail logic checks if any score has passed=True, not if all scores pass. Mixed results with at least one passing score will show as passed.

Complete Example