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

# evaluate • AI Agent SDK

> evaluate: Evaluate the condition against the given context.

# evaluate

<div className="flex items-center gap-2">
  <Badge color="purple">Method</Badge>
</div>

> This is a method of the [**ExpressionCondition**](../classes/ExpressionCondition) class in the [**evaluator**](../modules/evaluator) module.

Evaluate the condition against the given context.

## Signature

```python theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
def evaluate(context: Dict[str, Any]) -> bool
```

## Parameters

<ParamField query="context" type="Dict" required={true}>
  Dictionary containing variables for evaluation. Special key 'previous\_output' is also substituted.
</ParamField>

### Returns

<ResponseField name="Returns" type="bool">
  Boolean result of condition evaluation.
  Returns False on evaluation errors (fail-safe).
</ResponseField>

## Uses

* `evaluate_condition`

## Source

<Card title="View on GitHub" icon="github" href="https://github.com/MervinPraison/PraisonAI/blob/main/src/praisonai-agents/praisonaiagents/conditions/evaluator.py#L44">
  `praisonaiagents/conditions/evaluator.py` at line 44
</Card>

***

## Related Documentation

<CardGroup cols={2}>
  <Card title="Evaluation Concept" icon="gavel" href="/docs/concepts/evaluation" />

  <Card title="LLM as Judge" icon="scale-balanced" href="/docs/features/llm-as-judge" />

  <Card title="Evaluation Loop" icon="rotate" href="/docs/eval/evaluation-loop" />
</CardGroup>
