Skip to main content
Deterministic assertions run inside ->assert(...), per sample, before any judge. The closure receives an assertion proxy, the row, and the full response:
Anatomy
Every assertion records its expected and actual values — failures come with receipts, in the test output and the dashboard. In class-based evaluations the same checks are $this->assert*() methods (e.g. $a->toolCalled(...)$this->assertToolCalled(...)).

Content

Structure

Agent behavior

These inspect the real AgentResponse — actual tool calls with their arguments, actual steps — not text parsing:

Usage & cost

Safety pre-filters

Named honestly — these are wordlist and regex checks, useful as cheap gates, not classifiers:
Anything needing actual judgment — tone, toxicity in context, factuality — belongs to the LLM judge, not a wordlist.

Scalars

equals($expected, $actual), true($condition), false($condition), greaterThan($threshold, $actual), lessThan($threshold, $actual) — for checks you compute yourself from $row and $response.

Custom assertions

Implement the contract once, use it everywhere:
app/Evals/Assertions/MentionsOrderNumber.php
Using it