> For the complete documentation index, see [llms.txt](https://docs.stackai.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.stackai.com/stackai-mcp/tool-reference/evaluations-and-monitoring/evals-evaluators-create.md).

# 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.

```json
{
  "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.

```json
{
  "evaluator": {
    "evaluator_id": "<evaluator-id>",
    "evaluator_type": "builtin_rule",
    "score_kind": "boolean",
    "config": {
      "rule": "regex",
      "pattern": "\\S",
      "target_output_node_id": "out-0"
    }
  }
}
```

## 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.

## Related resources

[Evaluations and monitoring](https://docs.stackai.com/stackai-mcp/tool-reference/evaluations-and-monitoring.md)

[Evaluate a project before rollout](https://docs.stackai.com/stackai-mcp/workflow-recipes/evaluate-a-project-before-rollout.md)

[Connection, permissions, pagination, and recovery](https://docs.stackai.com/stackai-mcp/best-practices-and-troubleshooting.md)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.stackai.com/stackai-mcp/tool-reference/evaluations-and-monitoring/evals-evaluators-create.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
