OptionalkindThe kind of the evaluation.
"CODE": Code-based evaluator that runs custom logic"LLM": LLM-based evaluator that uses a language modelOptionalnameThe name of the evaluator / metric that it measures.
If not provided, the function will attempt to infer the name from the function's name property.
If the function has no name, a unique name will be generated.
OptionaloptimizationThe direction to optimize the numeric evaluation score.
"MAXIMIZE": Higher scores are better (e.g., accuracy, F1 score)"MINIMIZE": Lower scores are better (e.g., error rate, latency)OptionaltelemetryThe telemetry configuration for the evaluator.
When enabled, the evaluator will automatically create OpenTelemetry spans for tracing and observability. This allows you to track evaluator performance and debug issues in distributed systems.
Options for creating a custom evaluator using createEvaluator.