The arguments for creating a classification-based evaluator

interface CreateClassificationEvaluatorArgs {
    choices: ClassificationChoicesMap;
    model: LanguageModel;
    name: string;
    optimizationDirection?: OptimizationDirection;
    promptTemplate: string;
    telemetry?: { isEnabled?: boolean; tracer?: Tracer };
}

Hierarchy (View Summary)

Properties

The choices to classify the example into. e.g. { "correct": 1, "incorrect": 0 }

model: LanguageModel
name: string

The name of the metric that the evaluator produces E.x. "correctness"

optimizationDirection?: OptimizationDirection

If present, represents the direction in which you want the metric to be optimized E.x. "MAXIMIZE" means you want the number to be higher.

promptTemplate: string

The prompt template to use for classification

telemetry?: { isEnabled?: boolean; tracer?: Tracer }

Type declaration

  • OptionalisEnabled?: boolean

    Whether OpenTelemetry is enabled on the call. Defaults to true for visibility into the evals calls.

    true
    
  • Optionaltracer?: Tracer

    The tracer to use for the call. If not provided, the traces will get picked up by the global tracer.