evaluator
Evaluator
properties
name
score_config
setters
set_name
set_score_config
methods
evaluate
Evaluate the given response for this input prompt, with optional extra data.
Arguments:
prompt
- The user message or the full input prompt being responded to.response
- The response which is being evaluated, either as just the mostkwargs
- Extra information relevant to the prompt, as is stored in the Datum.
Returns:
The score, either as a boolean, a float, or the full Score instance.
dunder_methods
__init__
Create an Evaluator.
Arguments:
name
- The name for this evaluator.score_config
- Either a derived Score subclass, or the configuration for theapi_key
- API key for accessing the Unify API. If None, it attempts to
Raises:
UnifyError
: If the API key is missing.