Skip to main content
A good eval should decompose “did this succeed?” into signals you can explain. NiceEval lets you mix precise assertions, semantic judges, event-stream checks, and real tests.

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

These check facts about the whole run, usually from the standard event stream or sandbox artifacts.

LLM-as-judge

Judge checks fit semantic quality, but they don’t replace every deterministic assertion. Prefer exact checks wherever you can make them.

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

This is especially useful for coding agents and long-chain agents, where hiding quality problems behind heavy retries or excessive tool calls becomes possible.

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.