type and an optional value. When you run an eval, the agent applies every assertion in the assert array to the model output for that case and records pass (1) or fail (0).
Deterministic assertions
Deterministic assertions run without calling a model. They are fast, free, and should be your first line of defense.is-json and contains-json do not require a value field. The dataset-case schema marks value as required on the assertion object, but for these two types you can omit it or pass null.Examples
Model-assisted assertions
Model-assisted assertions use a judge model to evaluate output quality when deterministic checks are not sufficient (tone, coherence, factual accuracy, relevance).similar threshold
For similar, include a threshold field alongside value:
0.8 means the output must be at least 80% semantically similar to the reference. Lower thresholds allow more variation.
Writing good rubrics for llm-rubric
When using llm-rubric, specificity matters:
Examples
Performance assertions
Performance assertions check system-level properties rather than output content.Examples
Negation
Any assertion type can be negated by prependingnot- to the type name. The result is inverted: the assertion passes when the original assertion would fail.
Examples
Assertion precedence
If a suite references evaluator files AND dataset cases contain inlineassert blocks, both apply. They are additive:
- Evaluator files are per-suite — they score every case in the suite.
- Inline
assertblocks are per-case — they score only that specific case.
assert_pass_rate = (assertions passed) / (total assertions in the assert array). This is reported separately from evaluator metric scores.
Quick eval assertions
In a quick eval file, assertions are embedded directly in each case:Decision table
Use this table to choose the right assertion for what you want to check.Assertion type pattern
Thedataset-case schema validates assertion types against this pattern: