# comparison_evaluator

> **Function** in `langsmith`

📖 [View in docs](https://reference.langchain.com/python/langsmith/evaluation/evaluator/comparison_evaluator)

Create a comaprison evaluator from a function.

## Signature

```python
comparison_evaluator(
    func: Callable[[Sequence[Run], Optional[Example]], Union[_COMPARISON_OUTPUT, Awaitable[_COMPARISON_OUTPUT]]],
) -> DynamicComparisonRunEvaluator
```

---

[View source on GitHub](https://github.com/langchain-ai/langsmith-sdk/blob/c2450d95237768ddd7e77a60f4939f164fca3e8d/python/langsmith/evaluation/evaluator.py#L653)