For the complete documentation index, see llms.txt. This page is also available as Markdown.

evals_evaluators_preview

Dry-run an evaluator configuration on 1 to 3 samples before saving it.

Effect: This call executes a workflow or evaluator. Review its effects and possible usage charges before calling it.

Inputs

Name
Type
Requirement
Description

project_id

string

Required

ID returned by projects_list; use a project in the active organization.

evaluator_type

builtin_rule or llm_judge

Required

builtin_rule for deterministic rules or llm_judge for model-based scoring.

config

object

Required

Configuration object for the selected evaluator type. Obtain a valid starting point from evals_evaluator_templates_list.

samples

array of samples

Required

1–3 objects. Each requires generated_output; optional inputs and expected_output are objects.

judge_provider

string

Optional

Optional judging provider ID for an LLM judge. Use a supported provider and model pair.

judge_model_id

string

Optional

Optional model ID for an LLM judge. Use a model supported by the selected provider.

Each sample requires a generated_output object. Optional inputs and expected_output provide context to the evaluator.

Example

These are MCP tool arguments, not an HTTP request body. Replace bracketed IDs with values returned from your account.

This example assumes a Start input named question and an output named out-0. Replace them with the project’s actual keys. The regular-expression rule, where used, checks only that the output contains non-whitespace text.

{
  "project_id": "<project-id>",
  "evaluator_type": "builtin_rule",
  "config": {
    "rule": "regex",
    "pattern": "\\S",
    "target_output_node_id": "out-0"
  },
  "samples": [
    {
      "generated_output": {
        "out-0": "Approval is required."
      }
    }
  ]
}

Result

Abbreviated result example; unshown fields are omitted for clarity.

Behavior

For an LLM judge, judge_provider and judge_model_id select the judging model.

The preview does not save an evaluator; llm_judge previews spend judge tokens.

Returns one verdict per sample with score, choice_label, feedback, status and error.

Fix the config until every verdict is scored, then call evals_evaluators_create.

Troubleshooting

A failed verdict means the evaluator did not score that sample. Correct the configuration or model selection and preview again before saving.

Evaluations and monitoring

Evaluate a project before rollout

Connection, permissions, pagination, and recovery

Was this helpful?