Contents

init(_:scale:judge:scoringMode:prompt:)

Creates a single-metric evaluator with a custom judge prompt.

Declaration

init(_ name: String, scale: ScoringScale, judge: any LanguageModel, scoringMode: ScoringMode = .discrete, prompt: ModelJudgePrompt<Input>)

Parameters

  • name:

    The metric name that corresponds to the DataFrame column.

  • scale:

    The scoring scale for this metric.

  • judge:

    The language model to use as judge.

  • scoringMode:

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

  • prompt:

    Configuration for the judge prompt, including instructions, response presentation, and reference.

See Also

Creating a single-dimension evaluator