Choose the assertion type
Value assertions
includes accepts both substrings and regexes. matches only accepts a Standard Schema / Zod schema, for structural validation — it does not do regex matching. Value assertions fit results that are precise, stable, and low-ambiguity.
Scoped assertions
LLM-as-judge
Gate vs soft
gate: a failure is a failure.soft: keep the score, used to compare quality.
Use tests to score code tasks
Run project tests or short probe scripts inside.eval.ts:
Cost and efficiency
Practical advice
- Write one or two gates first to establish the task’s baseline.
- Then add soft scores to compare quality.
- Use Judge for complex semantics, but give the Judge a clear rubric.
- For coding-agent results, verify with real tests wherever possible.
- Write failure messages clearly, so you can locate problems directly from the report.