Skip to main content
Once you’ve written evaluators with verify() and Verdict, you need an eval workflow that ties them together. The eval workflow defines which evaluators to run, how to interpret their results, and whether each one is required or informational.

Creating an Eval Workflow

evalWorkflow() connects your evaluators and tells the framework how to interpret their results. The eval workflow file lives at tests/evals/workflow.ts inside your workflow directory. A minimal example with one evaluator:
tests/evals/workflow.ts
A more realistic example mixing deterministic checks and LLM judges:
tests/evals/workflow.ts
Each entry in the evals array has three fields:

Criticality

  • required (default): If this evaluator fails, the entire case fails. Use for checks that gate quality — topic relevance, minimum length, factual accuracy.
  • informational: Failure is reported but doesn’t affect the case verdict. Use for metrics you want to track without gating on — tone classification, style scores, auxiliary checks.

Interpret Types

Your evaluators return raw values (booleans, numbers, strings, verdicts). The interpret config tells the framework how to convert those into pass/partial/fail: The partial threshold is optional for both number and string types — omit it to have only pass and fail.

Case Verdict Aggregation

Each dataset case runs all evaluators. The case-level verdict follows these rules:
  1. If any required evaluator fails, the case fails
  2. Else if any required evaluator is partial, the case is partial
  3. Otherwise, the case passes
Informational evaluators never affect the case verdict.

Running Evals from the CLI

The output workflow test command runs your eval workflow against datasets.

Common Commands

Flags

Use --cached during development when iterating on evaluators — it’s fast because it skips the workflow entirely. Use --save when you want to capture fresh output and eval results.
Nested workflow folders work without any extra setup. output workflow test content_writing_style_anchor resolves datasets by the workflow’s registered name — src/workflows/content/writing/style_anchor/tests/datasets/ — and output workflow dataset generate writes new datasets to that same folder. Keep the worker running so the CLI can map the registered name to its folder; flat layouts resolve offline exactly as before.

Putting It All Together

Here’s the complete setup for a blog generator workflow: 1. Write evaluators — mix deterministic checks and LLM judges:
tests/evals/evaluators.ts
2. Wire into an eval workflow:
tests/evals/workflow.ts
3. Create datasets:
tests/datasets/stripe_blog.yml
4. Run:

What’s Next