Evaluator using the CustomEvaluator class. This allows easly define your onw LLM as a judge for specific use cases.
Custom evaluators are particularly useful when you need to evaluate specific aspects of LLM responses that aren’t covered by the built-in evaluators, or when you need a specialized scoring system for your use case.
Creating a Custom Evaluator
TheCustomEvaluator class allows you to define your own evaluation criteria with a custom scoring system. Here’s how to create one:
Custom Evaluator Parameters
name: A descriptive name for your evaluatordescription: A detailed description of what the evaluator checksinstructions: Detailed instructions for the LLM judge on how to evaluate responsesthreshold: The minimum score needed to pass the evaluationscore_range: The range of possible scores (min, max)scores: A list of score definitions with descriptions