> 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/workflow-recipes/evaluate-a-project-before-rollout.md).

# Evaluate a project before rollout

Check a workflow against representative cases before relying on it more widely. Generate the outputs, score them, and inspect individual failures as well as summary scores.

## Understand the parts

| Term          | Meaning                                                                   |
| ------------- | ------------------------------------------------------------------------- |
| Dataset       | A collection of input cases, optionally with expected outputs.            |
| Evaluator     | A rule or model that scores an output.                                    |
| Experiment    | A fixed copy of dataset rows associated with a project version.           |
| Node contract | The input keys and output-node IDs that the dataset and evaluator expect. |
| Generate      | Run the workflow for the cases; optionally score the new outputs.         |
| Score         | Evaluate outputs that already exist, without generating them again.       |

## Before you start

You need access to the project, dataset, and compatible evaluators, plus permission to execute the experiment. Generation runs the workflow and can call its integrations. Start with a small set of cases. LLM judges can incur model usage charges.

## Prepare the cases and scoring rule

1. Read the project and identify its input keys and output-node IDs.
2. Create a dataset with `evals_datasets_create`, using a matching `node_contract`. Add rows with `evals_dataset_rows_add` if you did not include them at creation.
3. Use `evals_evaluators_list` with `compatible_with_dataset_id` to find an existing scoring rule. Do not also supply an experiment compatibility filter.
4. To create a rule, start with `evals_evaluator_templates_list`, preview the configuration on 1–3 samples, and save it with `evals_evaluators_create`. A `scored` verdict means scoring completed; it does not necessarily mean the answer passed your rule.

## Create the experiment

Call `evals_experiments_create` with the dataset ID and a published project-version number:

```json
{
  "dataset_id": "<dataset-id>",
  "project_version_id": 1,
  "name": "Pre-release review"
}
```

Replace `1` with the intended published version. The dataset rows are copied into the experiment. Selecting `draft` instead creates a warning because the draft can still change. Evaluator definitions can also change; record which versions/configurations you use when comparing results.

## Generate and score

For a new experiment, call **`evals_experiments_run`** in `generate` mode:

```json
{
  "experiment_id": "<experiment-id>",
  "mode": "generate",
  "evaluator_ids": [
    "<compatible-evaluator-id>"
  ]
}
```

Supply evaluator IDs for this call even if you selected them when creating the experiment. An empty list generates outputs without scoring.

Keep the returned `job_id`. Poll **`evals_experiments_status`** using the same experiment and job IDs:

```json
{
  "experiment_id": "<experiment-id>",
  "job_id": "<accepted-job-id>"
}
```

## Read the result

| Status                    | Next step                                                                 |
| ------------------------- | ------------------------------------------------------------------------- |
| `queued` or `running`     | Wait and poll the same job.                                               |
| `completed`               | Read the results and scores.                                              |
| `completed_with_failures` | Inspect failed rows and scoring errors.                                   |
| `failed` or `cancelled`   | Inspect the job error and existing rows before deciding what to run next. |
| Unavailable status        | Retry the status read, not the execution call.                            |

Call `evals_experiments_get` with `expand: ["rows"]`. Follow `rows_pagination.next_cursor` until all results have been read. Compare scores with generated outputs, expected outputs, and error fields. Row counts alone do not establish job completion.

## Score existing outputs again

Use `mode: "score"` only after outputs exist, for example to apply another compatible evaluator. Supply at least one evaluator ID and follow the new accepted job. This does not regenerate the workflow outputs.

## Tool reference

* [projects\_get](https://docs.stackai.com/stackai-mcp/tool-reference/projects-and-workflow-authoring/projects-get.md)
* [evals\_datasets\_create](https://docs.stackai.com/stackai-mcp/tool-reference/evaluations-and-monitoring/evals-datasets-create.md)
* [evals\_dataset\_rows\_add](https://docs.stackai.com/stackai-mcp/tool-reference/evaluations-and-monitoring/evals-dataset-rows-add.md)
* [evals\_evaluators\_list](https://docs.stackai.com/stackai-mcp/tool-reference/evaluations-and-monitoring/evals-evaluators-list.md)
* [evals\_evaluator\_templates\_list](https://docs.stackai.com/stackai-mcp/tool-reference/evaluations-and-monitoring/evals-evaluator-templates-list.md)
* [evals\_evaluators\_preview](https://docs.stackai.com/stackai-mcp/tool-reference/evaluations-and-monitoring/evals-evaluators-preview.md)
* [evals\_evaluators\_create](https://docs.stackai.com/stackai-mcp/tool-reference/evaluations-and-monitoring/evals-evaluators-create.md)
* [evals\_experiments\_create](https://docs.stackai.com/stackai-mcp/tool-reference/evaluations-and-monitoring/evals-experiments-create.md)
* [evals\_experiments\_run](https://docs.stackai.com/stackai-mcp/tool-reference/evaluations-and-monitoring/evals-experiments-run.md)
* [evals\_experiments\_status](https://docs.stackai.com/stackai-mcp/tool-reference/evaluations-and-monitoring/evals-experiments-status.md)
* [evals\_experiments\_get](https://docs.stackai.com/stackai-mcp/tool-reference/evaluations-and-monitoring/evals-experiments-get.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/workflow-recipes/evaluate-a-project-before-rollout.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.
