EvalContext that accumulates evaluation data and builds into an EvalResult.
Pre-populated Fields
Set context fields directly in the@eval decorator:
cases=, input and reference in each case auto-populate the context fields:
Setting Fields
Input, Output, and Reference
Metadata
Store additional context for debugging and analysis:Scoring with Assertions
Use assertions to score:Using store() for Explicit Scoring
For numeric scores or multiple named metrics, usestore():
Setting Multiple Fields at Once
store() lets you set multiple context fields in one call:
Auto-Return Behavior
You don’t need to explicitly return anything—the context automatically builds into anEvalResult when the function completes:
Exception Safety
If your evaluation throws an exception, partial data is preserved:EvalResult will have:
inputandoutputpreservederrorfield with the exception message- A failing score automatically added
Default Scoring
If no score is added and no assertions fail, EZVals auto-adds a passing score:Custom Parameters
For case-based tests with custom data, store it inctx.input:

