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

# Eval Sets

The `evalSets` query returns the evaluation sets of a domain. It requires the `evaluation:read` permission.

## Signature

```graphql theme={null}
evalSets(domainId: ID!, draftId: ID): [EvalSet!]!
```

| Argument | Type | Description |
| :- | :- | :- |
| `domainId` | `ID!` | The domain to return evaluation sets for. |
| `draftId` | `ID` | A draft of the domain. The response also includes the sets staged on that draft. |

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

## Example

```graphql theme={null}
query EvalSets($domainId: ID!) {
  evalSets(domainId: $domainId) {
    id
    name
    version
    isLocked
    caseIds
    items {
      prompt
      sql
    }
  }
}
```

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

```json Response theme={null}
{
  "data": {
    "evalSets": [
      {
        "id": "eval_set_123",
        "name": "Revenue questions",
        "version": 2,
        "isLocked": false,
        "caseIds": ["case_001"],
        "items": [
          [
            {
              "prompt": "What is the total revenue for closed won opportunities?",
              "sql": ["SELECT SUM(amount) FROM Opportunity WHERE stage = 'Closed Won'"]
            }
          ]
        ]
      }
    ]
  }
}
```


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