> ## Documentation Index
> Fetch the complete documentation index at: https://docs.wisdom.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Run Evaluation

The `runEvaluation` mutation starts an evaluation run and returns a run group ID. It requires the `evaluation:write` permission.

## Signature

```graphql theme={null}
runEvaluation(
  domainId: String!
  existingEvalSetId: String!
  runCount: Int
  chatMode: ChatMode
  draftId: ID
  evaluationCaseIds: [ID!]
): String!
```

| Argument | Type | Description |
| :- | :- | :- |
| `domainId` | `String!` | The domain that contains the evaluation set. |
| `existingEvalSetId` | `String!` | The evaluation set to run. |
| `runCount` | `Int` | How many times to run the set. Defaults to 1. A higher count helps you spot flaky cases. |
| `chatMode` | `ChatMode` | `FAST`, `NORMAL`, or `DEEP_THINK`. Defaults to `NORMAL`. |
| `draftId` | `ID` | A draft of the domain. The run uses the draft version of the domain. |
| `evaluationCaseIds` | `[ID!]` | Limits the run to these cases. Use IDs from `caseIds` on the evaluation set. |

Returns the run group ID as a `String`. It is a run group ID, not a run ID, even when `runCount` is 1. Pass it to [evaluationRunGroup](https://docs.wisdom.ai/integrations/graphql-api/queries/evaluation/evaluation-run-group.md) to get the individual runs.

## Example

```graphql theme={null}
mutation RunEvaluation($domainId: String!, $existingEvalSetId: String!) {
  runEvaluation(domainId: $domainId, existingEvalSetId: $existingEvalSetId)
}
```

```json Variables theme={null}
{ "domainId": "domain_987654321", "existingEvalSetId": "eval_set_123" }
```

```json Response theme={null}
{ "data": { "runEvaluation": "run_group_789" } }
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.