> 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-preview.md).

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

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

```json
{
  "verdicts": [
    {
      "score_kind": "boolean",
      "score": 1.0,
      "status": "scored",
      "error": null
    }
  ]
}
```

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

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