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

# client.ground_truth

## `create`

```python theme={null}
create(
    agent_id: int,
    name: str,
    evaluation_instructions: str,
    runs: List[GroundTruthRun],
) -> GroundTruth
```

Create a new ground truth for an agent.

**Parameters:**

| Name | Type | Description | Default |
| - | - | - | - |
| `agent_id` | `int` | The ID of the agent | *required* |
| `name` | `str` | Name of the ground truth | *required* |
| `evaluation_instructions` | `str` | Instructions used to evaluate agent runs against this ground truth | *required* |
| `runs` | `List[GroundTruthRun]` | List of ground truth runs defining the expected data | *required* |

## `get`

```python theme={null}
get(
    agent_id: int, ground_truth_id: int
) -> GroundTruth
```

Get a specific ground truth by ID.

**Parameters:**

| Name | Type | Description | Default |
| - | - | - | - |
| `agent_id` | `int` | The ID of the agent | *required* |
| `ground_truth_id` | `int` | The ID of the ground truth to retrieve | *required* |

## `list`

```python theme={null}
list(
    agent_id: int, page_number: int = 0, page_size: int = 50
) -> ListGroundTruthsResponse
```

Get a paginated list of ground truths for an agent.

**Parameters:**

| Name | Type | Description | Default |
| - | - | - | - |
| `agent_id` | `int` | The ID of the agent | *required* |
| `page_number` | `int` | Page number for pagination (default: 0) | `0` |
| `page_size` | `int` | Number of items per page (default: 50, max: 1000) | `50` |

## `delete`

```python theme={null}
delete(agent_id: int, ground_truth_id: int) -> None
```

Delete a specific ground truth.

**Parameters:**

| Name | Type | Description | Default |
| - | - | - | - |
| `agent_id` | `int` | The ID of the agent | *required* |
| `ground_truth_id` | `int` | The ID of the ground truth to delete | *required* |

## `create_version`

```python theme={null}
create_version(
    agent_id: int,
    ground_truth_id: int,
    evaluation_instructions: str,
    runs: List[GroundTruthRun],
) -> GroundTruth
```

Create a new version of an existing ground truth.

**Parameters:**

| Name | Type | Description | Default |
| - | - | - | - |
| `agent_id` | `int` | The ID of the agent | *required* |
| `ground_truth_id` | `int` | The ID of the ground truth to version | *required* |
| `evaluation_instructions` | `str` | Updated evaluation instructions for this version | *required* |
| `runs` | `List[GroundTruthRun]` | Updated list of ground truth runs for this version | *required* |

## `get_version`

```python theme={null}
get_version(
    agent_id: int, ground_truth_id: int, version: int
) -> GroundTruth
```

Get a specific version of a ground truth.

**Parameters:**

| Name | Type | Description | Default |
| - | - | - | - |
| `agent_id` | `int` | The ID of the agent | *required* |
| `ground_truth_id` | `int` | The ID of the ground truth | *required* |
| `version` | `int` | The version number to retrieve | *required* |

## `list_versions`

```python theme={null}
list_versions(
    agent_id: int,
    ground_truth_id: int,
    page_number: int = 0,
    page_size: int = 50,
) -> ListGroundTruthVersionsResponse
```

Get a paginated list of all versions of a ground truth.

**Parameters:**

| Name | Type | Description | Default |
| - | - | - | - |
| `agent_id` | `int` | The ID of the agent | *required* |
| `ground_truth_id` | `int` | The ID of the ground truth | *required* |
| `page_number` | `int` | Page number for pagination (default: 0) | `0` |
| `page_size` | `int` | Number of items per page (default: 50, max: 1000) | `50` |


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