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

# Criteria

> Manage task criteria (typed assertions).

Manage [criteria](/guides/concepts/criteria), the typed assertions that the verification engine runs against a task run.

## Actions

| Action   | Description                  |
| -------- | ---------------------------- |
| `list`   | List all criteria for a task |
| `create` | Create a new criterion       |
| `get`    | Get a criterion by ID        |
| `update` | Update a criterion           |
| `delete` | Delete a criterion           |

## Parameters

### `list`

| Parameter | Type   | Required | Description                  |
| --------- | ------ | -------- | ---------------------------- |
| `taskId`  | string | yes      | Task ID to list criteria for |

### `create`

| Parameter       | Type   | Required | Description                                                                 |
| --------------- | ------ | -------- | --------------------------------------------------------------------------- |
| `taskId`        | string | yes      | Task ID to attach the criterion to                                          |
| `label`         | string | yes      | Short human-readable label                                                  |
| `assertion`     | object | yes      | Typed assertion spec. See [Criteria API](/api-reference/resources/criteria) |
| `weight`        | number | no       | Relative weight (default `1`)                                               |
| `axis`          | string | no       | Optional scoring axis                                                       |
| `inputEntityId` | string | no       | Optional DatasetEntity ID the criterion is scoped to                        |

### `get`

| Parameter | Type   | Required | Description  |
| --------- | ------ | -------- | ------------ |
| `id`      | string | yes      | Criterion ID |

### `update`

| Parameter       | Type   | Required | Description                     |
| --------------- | ------ | -------- | ------------------------------- |
| `id`            | string | yes      | Criterion ID                    |
| `label`         | string | no       | Updated label                   |
| `assertion`     | object | no       | Updated assertion spec          |
| `weight`        | number | no       | Updated weight                  |
| `axis`          | string | no       | Updated axis                    |
| `inputEntityId` | string | no       | Updated scoped DatasetEntity ID |

### `delete`

| Parameter | Type   | Required | Description  |
| --------- | ------ | -------- | ------------ |
| `id`      | string | yes      | Criterion ID |

## Examples

### Create a FHIR criterion

```json theme={null}
{
  "action": "create",
  "taskId": "task_xyz789",
  "label": "Appointment booked with correct provider",
  "weight": 1,
  "axis": "correctness",
  "assertion": {
    "assert": "fhir-resource-state",
    "resource_type": "Appointment",
    "search": { "patient": "Patient/john-smith", "status": "booked" },
    "fields": [
      { "path": "participant.0.actor.display", "expected": "Dr. Rivera" }
    ]
  }
}
```

### Create a voice transcript criterion

```json theme={null}
{
  "action": "create",
  "taskId": "task_xyz789",
  "label": "Required disclosures",
  "weight": 0.5,
  "assertion": {
    "assert": "voice-transcript",
    "speaker": "agent",
    "contains": ["member ID", "date of birth"]
  }
}
```

### List criteria for a task

```json theme={null}
{
  "action": "list",
  "taskId": "task_xyz789"
}
```
