File size: 440 Bytes
09da05c
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
"""Evaluation pipelines for persona quality."""

from __future__ import annotations

from dataclasses import dataclass
from typing import Iterable


@dataclass
class EvaluationSuite:
    """Runs rule-based or LLM-as-judge evaluations."""

    checks: Iterable = ()

    def run(self, response: str) -> dict:
        results = {}
        for check in self.checks:
            results[check.__name__] = check(response)
        return results