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

# Evaluation Service

> Evaluation Service API methods in the Galtea SDK

> [!WARNING]
>
> You are reading the docs of Galtea 5.17. [Read this page in the latest version](https://docs.galtea.ai/sdk/api/evaluation/service.md).

The Evaluation Service in the Galtea SDK allows you to manage [evaluations](https://docs.galtea.ai/v5.17/concepts/product/version/session/evaluation.md) for assessing your products.
This Service is exposed by the `galtea.evaluations` object.

> [!NOTE]
>
> Remember that we will be using the `galtea` object. More information [here](https://docs.galtea.ai/v5.17/sdk/api/galtea.md).

## Quick Example

First, initialize the Galtea SDK:

```python theme={"system"}
galtea = Galtea(api_key="YOUR_API_KEY")
```

Create evaluations of a session (one per metric):

```python theme={"system"}
evaluations = galtea.evaluations.create(
    session_id=session_id,
    metrics=[{"name": "Role Adherence"}, {"name": "Conversation Relevancy"}],
)
```

At some point later, you will be able to list all evaluations for that session:

```python theme={"system"}
evaluations = galtea.evaluations.list(session_id=session_id)
```

Display the results:

> [!TIP]
>
> Evaluations start in `PENDING` status while the evaluation engine processes them. Use [`wait_for()`](https://docs.galtea.ai/v5.17/sdk/api/evaluation/wait-for) to poll until all evaluations have completed before reading results.

```python theme={"system"}
print(f"Total evaluations: {len(evaluations)}")
scores = [ev.score for ev in evaluations if ev.score is not None]
if len(scores) > 0:
    average_score = sum(scores) / len(scores)
    print(f"Average Score: {average_score}")
else:
    print("No scores available yet")

print("Detailed Results:")
for evaluation in evaluations:
    metric = galtea.metrics.get(metric_id=evaluation.metric_id)
    print(f"Metric: {metric}")
    print(f"    Score: {evaluation.score}")
    print(f"    Reason: {evaluation.reason}")
```

## Service Methods

* [Run Evaluation](https://docs.galtea.ai/v5.17/sdk/api/evaluation/run.md)
* [Create Single-Turn Evaluation](https://docs.galtea.ai/v5.17/sdk/api/evaluation/create-single-turn.md)
* [Create Evaluations](https://docs.galtea.ai/v5.17/sdk/api/evaluation/create.md)
* [Wait for Evaluations](https://docs.galtea.ai/v5.17/sdk/api/evaluation/wait-for.md)
* [Listing Evaluations](https://docs.galtea.ai/v5.17/sdk/api/evaluation/list.md)
* [Retrieving Evaluation](https://docs.galtea.ai/v5.17/sdk/api/evaluation/get.md)
* [Deleting Evaluation](https://docs.galtea.ai/v5.17/sdk/api/evaluation/delete.md)
* [Retrying Evaluations](https://docs.galtea.ai/v5.17/sdk/api/evaluation/retry.md)

## Related

> [card] [Evaluation](https://docs.galtea.ai/v5.17/concepts/product/version/session/evaluation.md)
>
> The assessment of an evaluation using a specific metric's criteria


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