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

# Evaluator

> Evaluator utilities for data models and type definitions used throughout the maxim sdk.

[View module source on GitHub](https://github.com/maximhq/maxim-py/blob/main/maxim/models/evaluator.py)

## [Evaluator](/docs/sdk/python/references/models/evaluator)

```python theme={null}
@dataclass
class Evaluator()
```

This class represents an evaluator.

## [LocalEvaluatorReturn](/docs/sdk/python/references/models/evaluator)

```python theme={null}
@dataclass
class LocalEvaluatorReturn()
```

This class represents the return value of a local evaluator.

#### \_\_init\_\_

```python theme={null}
def __init__(score: Union[int, bool, str], reasoning: Optional[str] = None)
```

This class represents the return value of a local evaluator.

**Arguments**:

| Name | Description |
| - | - |
| `score` | The score of the evaluator. |
| `reasoning` | The reasoning of the evaluator. |

## [PassFailCriteriaOnEachEntry](/docs/sdk/python/references/models/evaluator)

```python theme={null}
@dataclass
class PassFailCriteriaOnEachEntry()
```

This class represents the pass fail criteria on each entry.

#### \_\_init\_\_

```python theme={null}
def __init__(score_should_be: OperatorType, value: Union[bool, int, float,
                                                         None])
```

This class represents the pass fail criteria on each entry.

**Arguments**:

| Name | Description |
| - | - |
| `score_should_be` | The score should be. |
| `value` | The value of the pass fail criteria. |

## [PassFailCriteriaForTestrunOverall](/docs/sdk/python/references/models/evaluator)

```python theme={null}
@dataclass
class PassFailCriteriaForTestrunOverall()
```

This class represents the pass fail criteria for the overall testrun.

#### \_\_init\_\_

```python theme={null}
def __init__(overall_should_be: OperatorType, value: int,
             for_result: Literal["average", "percentageOfPassedResults"])
```

This class represents the pass fail criteria for the overall testrun.

**Arguments**:

| Name | Description |
| - | - |
| `overall_should_be` | The overall should be. |
| `value` | The value of the pass fail criteria. |
| `for_result` | The for result. |

## [PassFailCriteria](/docs/sdk/python/references/models/evaluator)

```python theme={null}
@dataclass
class PassFailCriteria()
```

This class represents the pass fail criteria.

#### \_\_init\_\_

```python theme={null}
def __init__(on_each_entry_pass_if: PassFailCriteriaOnEachEntry,
             for_testrun_overall_pass_if: PassFailCriteriaForTestrunOverall)
```

This class represents the pass fail criteria.

**Arguments**:

| Name | Description |
| - | - |
| `on_each_entry_pass_if` | The pass fail criteria on each entry. |
| `for_testrun_overall_pass_if` | The pass fail criteria for the overall testrun. |

## [LocalEvaluatorResultParameter](/docs/sdk/python/references/models/evaluator)

```python theme={null}
@dataclass
class LocalEvaluatorResultParameter()
```

This class represents the result parameter of a local evaluator.

#### \_\_init\_\_

```python theme={null}
def __init__(output: str, context_to_evaluate: Optional[Union[str,
                                                              List[str]]])
```

This class represents the result parameter of a local evaluator.

**Arguments**:

| Name | Description |
| - | - |
| `output` | The output of the local evaluator. |
| `context_to_evaluate` | The context to evaluate. |

## [LocalEvaluationResult](/docs/sdk/python/references/models/evaluator)

```python theme={null}
@dataclass
class LocalEvaluationResult()
```

This class represents the result of a local evaluation.

#### \_\_init\_\_

```python theme={null}
def __init__(result: LocalEvaluatorReturn, name: str,
             pass_fail_criteria: PassFailCriteria)
```

This class represents the result of a local evaluation.

**Arguments**:

| Name | Description |
| - | - |
| `result` | The result of the local evaluation. |
| `name` | The name of the local evaluation. |
| `pass_fail_criteria` | The pass fail criteria of the local evaluation. |

## [LocalEvaluationResultWithId](/docs/sdk/python/references/models/evaluator)

```python theme={null}
@dataclass
class LocalEvaluationResultWithId(LocalEvaluationResult)
```

This class represents the result of a local evaluation with an id.

#### \_\_init\_\_

```python theme={null}
def __init__(result: LocalEvaluatorReturn, name: str,
             pass_fail_criteria: PassFailCriteria, id: str)
```

This class represents the result of a local evaluation with an id.

**Arguments**:

| Name | Description |
| - | - |
| `result` | The result of the local evaluation. |
| `name` | The name of the local evaluation. |
| `pass_fail_criteria` | The pass fail criteria of the local evaluation. |
| `id` | The id of the local evaluation. |


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