Create an LLMEvaluator instance from a BaseChatModel instance.
from_model(
cls,
model: Any,
*,
prompt_template: Union[str, list[tuple[str, str]]],
score_config: Union[CategoricalScoreConfig, ContinuousScoreConfig],
map_variables: Optional[Callable[[Run, Optional[Example]], dict]] = None
)| Name | Type | Description |
|---|---|---|
model* | BaseChatModel | The chat model instance to use for the evaluation. |
prompt_template* | Union[str, List[Tuple[str, str]] | The prompt template to use for the evaluation. If a string is provided, it is assumed to be a system message. |
score_config* | Union[CategoricalScoreConfig, ContinuousScoreConfig] | The configuration for the score, either categorical or continuous. |
map_variables | Optional[Callable[[Run, Example]], dict]] | Default: NoneA function that maps the run and example to the variables in the prompt. If |