Optional logger: LDLoggerOptional Private Readonly _aiPrivate Readonly _aiPrivate Readonly _aiPrivate Readonly _evaluationPrivate Optional Readonly _loggerPrivate _constructPrivate _getGets the evaluation metric key, prioritizing evaluationMetricKey over evaluationMetricKeys. Falls back to the first valid (non-empty, non-whitespace) value in evaluationMetricKeys if evaluationMetricKey is not provided. Treats empty strings and whitespace-only strings as invalid.
The evaluation metric key, or undefined if not available
Private _interpolatePrivate _parseEvaluates an AI response using the judge's configuration.
The input prompt or question that was provided to the AI
The AI-generated response to be evaluated
Sampling rate (0-1) to determine if evaluation should be processed (defaults to 1)
Promise that resolves to evaluation results or undefined if not sampled
Evaluates an AI response from chat messages and response.
Array of messages representing the conversation history
The AI response to be evaluated
Sampling ratio (0-1) to determine if evaluation should be processed (defaults to 1)
Promise that resolves to evaluation results or undefined if not sampled
Returns the AI Config used by this judge.
Returns the AI provider used by this judge.
Returns the tracker associated with this judge.
Generated using TypeDoc
Judge implementation that handles evaluation functionality and conversation management.
According to the AIEval spec, judges are AI Configs with mode: "judge" that evaluate other AI Configs using structured output.