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

evals_evaluators_create

Create an evaluator that scores outputs using a built-in rule or an LLM judge.

Effect: This call saves data or changes configuration. Review the behavior below before using it.

Inputs

Name
Type
Requirement
Description

project_id

string

Required

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

name

string

Required

Resource name.

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.

node_contract

object

Required

Required input/output mapping: input_kind, nonempty input_keys, and nonempty output_node_ids. See the shape below.

description

string

Optional

Description of the resource or requested change.

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.

node_contract has input_kind (start_node or legacy_input_nodes), input_keys (nonempty string array), and output_node_ids (nonempty string array). Copy keys from the project. A Start node uses its field keys; legacy inputs use node IDs.

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>",
  "name": "Response review",
  "evaluator_type": "builtin_rule",
  "config": {
    "rule": "regex",
    "pattern": "\\S",
    "target_output_node_id": "out-0"
  },
  "node_contract": {
    "input_kind": "start_node",
    "input_keys": [
      "question"
    ],
    "output_node_ids": [
      "out-0"
    ]
  }
}

Result

Abbreviated result example; unshown fields are omitted for clarity.

Behavior

Use description to explain what the evaluator measures.

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

Start with evals_evaluator_templates_list to obtain valid configuration.

Troubleshooting

If access is denied, confirm the active organization with whoami and check access to the selected resource. Use returned IDs rather than names. For an invalid argument, follow the returned next_action and correct the request.

Evaluations and monitoring

Evaluate a project before rollout

Connection, permissions, pagination, and recovery

Was this helpful?