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

# Create Eval Set

The `createEvalSet` mutation creates an evaluation set in a domain. It requires the `evaluation:write` permission.

## Signature

```graphql theme={null}
createEvalSet(input: CreateEvalSetInput!): EvalSet!
```

`CreateEvalSetInput` fields:

| Field | Type | Description |
| :- | :- | :- |
| `name` | `String!` | The name of the evaluation set. |
| `domainId` | `String!` | The domain the evaluation set belongs to. |
| `items` | `[[PromptSQLPairInput!]!]!` | The sessions. Each session is an ordered list of turns, so you can create multi-turn cases. See [PromptSQLPair](https://docs.wisdom.ai/integrations/graphql-api/objects/evaluation-data-types.md#promptsqlpair). |
| `draftId` | `ID` | A draft of the domain. The set is staged on the draft and goes live when you publish the draft. |
| `customGradingInstructions` | `String` | Grading instructions for the whole set. |

Returns the new [EvalSet](https://docs.wisdom.ai/integrations/graphql-api/objects/evaluation-data-types.md#evalset).

## Example

```graphql theme={null}
mutation CreateEvalSet($input: CreateEvalSetInput!) {
  createEvalSet(input: $input) {
    id
    name
    version
    caseIds
  }
}
```

```json Variables theme={null}
{
  "input": {
    "name": "Revenue questions",
    "domainId": "domain_987654321",
    "items": [
      [
        {
          "prompt": "What is the total revenue for closed won opportunities?",
          "sql": ["SELECT SUM(amount) FROM Opportunity WHERE stage = 'Closed Won'"]
        },
        {
          "prompt": "Break that down by region.",
          "sql": ["SELECT region, SUM(amount) FROM Opportunity WHERE stage = 'Closed Won' GROUP BY region"],
          "assertions": [{ "criterion": "Breaks revenue down by region" }]
        }
      ]
    ]
  }
}
```

```json Response theme={null}
{
  "data": {
    "createEvalSet": {
      "id": "eval_set_123",
      "name": "Revenue questions",
      "version": 1,
      "caseIds": ["case_001"]
    }
  }
}
```


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