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

# Update Eval Set

The `updateEvalSet` mutation updates an evaluation set. It requires the `evaluation:write` permission, and the `evaluation:lock` permission if the set is locked.

## Signature

```graphql theme={null}
updateEvalSet(input: UpdateEvalSetInput!): EvalSet!
```

`UpdateEvalSetInput` fields:

| Field | Type | Description |
| :- | :- | :- |
| `id` | `ID!` | The evaluation set to update. |
| `domainId` | `ID!` | The domain the evaluation set belongs to. |
| `items` | `[[PromptSQLPairInput!]!]!` | The sessions. This list replaces the whole existing list, so pass every session you want to keep. |
| `name` | `String` | The new name. |
| `customGradingInstructions` | `String` | The new grading instructions. |

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

## Example

```graphql theme={null}
mutation UpdateEvalSet($input: UpdateEvalSetInput!) {
  updateEvalSet(input: $input) {
    id
    name
    version
  }
}
```

```json Variables theme={null}
{
  "input": {
    "id": "eval_set_123",
    "domainId": "domain_987654321",
    "name": "Revenue questions v2",
    "items": [
      [
        {
          "prompt": "What is the total revenue for closed won opportunities?",
          "sql": ["SELECT SUM(amount) FROM Opportunity WHERE stage = 'Closed Won'"]
        }
      ]
    ]
  }
}
```

```json Response theme={null}
{
  "data": {
    "updateEvalSet": {
      "id": "eval_set_123",
      "name": "Revenue questions v2",
      "version": 2
    }
  }
}
```


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