Contents

pairwise(judge:dimensions:scoringMode:evaluationTarget:)

Creates a multi-metric pairwise comparison evaluator.

Declaration

static func pairwise(judge: any LanguageModel, dimensions: [ScoreDimension], scoringMode: ScoringMode = .discrete, evaluationTarget: (@Sendable (Input.ExpectedValue) -> String)? = nil) -> ModelJudgeEvaluator<Input>

Parameters

  • judge:

    The language model to use as judge.

  • dimensions:

    The dimensions to score for the comparison.

  • scoringMode:

    A value that indicates whether scores are discrete (default) or allow any floating-point value.

  • evaluationTarget:

    An optional closure that converts the value to a string. Both responses use this target.

See Also

Creating a pairwise evaluator