Cases, datasets, and suites
Evaluation datasets are UTF-8 JSON Lines. Each non-empty line is one bounded JSON object.
{"id":"case-001","name":"Known answer","input":{"question":"2+2"},"expected_output":{"answer":4},"reference_contexts":["Arithmetic over integers"],"expected_tool_calls":["calculator"],"tags":["smoke","math"],"metadata":{"owner":"quality"}}
Field |
Required |
Contract |
|---|---|---|
|
yes |
non-empty and unique in the file |
|
yes |
finite JSON, bounded by loader limits |
|
no |
defaults to |
|
no |
finite JSON; required by some metrics |
|
no |
JSON array; required by some RAGAS metrics |
|
no |
ordered array of tool names |
|
no |
array used for deterministic selection |
|
no |
bounded scalar values only |
load_jsonl_suite() rejects duplicate IDs, non-finite numbers, oversized
lines/content, unknown requested IDs, and empty selections. Selection is
stable: explicit case IDs are sorted; tag filters are deterministic; a seeded
limit hashes case IDs before selecting and then restores stable order.
Persisted EvalCase values hold ContentReference objects with SHA-256, size,
media type, and a dataset URI. The loaded input, expected output, and reference
contexts remain ephemeral. Dataset storage and access control remain an
application responsibility.
A suite pins target, case IDs, judge names, metric names, gates, and tags.
Version the suite ID when its semantic contract changes. EvalRunner
parallelizes cases up to concurrency, but each AgentEvaluationTarget also
protects its ordinary agent’s mutable history. Use separate agent instances
when true target parallelism is required.