namespace AIStudio.Assistants.ModelComparison;
///
/// How often a judge chose the same as the user, across the runs which hold both a vote and a verdict of this judge.
///
public sealed record ModelComparisonJudgeAgreement
{
///
/// The judge, with the name it had in its latest comparison.
///
public required ModelComparisonModelIdentity Judge { get; init; }
///
/// How many runs the judge chose the same as the user: the same model, or a tie both times.
///
public int Agreements { get; init; }
///
/// How many runs hold both a vote of the user and a verdict of this judge.
///
public int ComparedRuns { get; init; }
///
/// The share of the compared runs in which the judge chose the same as the user, or null without such runs.
///
public double? Share => this.ComparedRuns == 0 ? null : (double)this.Agreements / this.ComparedRuns;
}