match(name: str, submission: str, expected: Union[str, List[str]]) -> bool
includes(name: str, submission: str, expected: Union[str, List[str]]) -> bool
fuzzy_match(name: str, submission: str, expected: Union[str, List[str]]) -> bool
submission
contains any of the expected
values or if any of the expected
values contain the submission
.Returns true
if there’s a fuzzy match, otherwise false
.not_match(name: str, submission: str, expected: Union[str, List[str]]) -> bool
submission
does not start with any of the expected
values.Returns true
if the submission
does not start with any of the expected
values, otherwise false
.not_includes(name: str, submission: str, expected: Union[str, List[str]]) -> bool
submission
does not contain any of the expected
values.Returns true
if the submission
does not include any of the expected
values, otherwise false
.not_fuzzy_match(name: str, submission: str, expected: Union[str, List[str]]) -> bool
submission
neither contains any of the expected
values nor is contained by any of the expected
values.Returns true
if there’s no fuzzy match, otherwise false
.valid_json(name: str, submission: str) -> bool
check_injection(name: str, submission: str) -> bool
custom(name: str, submission: str, fn: Callable[[str], bool]) -> bool
custom_async(name: str, submission: str, fn: Callable[[str], Awaitable[bool]]) -> bool
model_graded_custom(name: str, prompt: str, choices: dict[str, float], model: str, metadata: Optional[Dict[str, Any]], **variables) -> str
model_graded_fact(name: str, question: str, expert: str, submission: str) -> str
model_graded_closed_qa(name: str, task: str, submission: str, criterion: str) -> str
model_graded_security(name: str, submission: str) -> str