namespace AIStudio.Assistants.ModelComparison; /// /// How two models did directly against each other across all stored comparisons of the two. /// /// /// The first and the second model are those of the pair, see ModelComparisonPairKey, not those of a single comparison: /// a comparison in which the user picked them the other way round counts the same. /// public sealed record ModelComparisonPairing { /// /// The first model of the pair, with the name it had in its latest comparison. /// public required ModelComparisonModelIdentity First { get; init; } /// /// The second model of the pair, with the name it had in its latest comparison. /// public required ModelComparisonModelIdentity Second { get; init; } /// /// The votes of the user. /// public ModelComparisonTally Votes { get; init; } = ModelComparisonTally.NONE; /// /// The verdicts of the judges. /// public ModelComparisonTally JudgeVerdicts { get; init; } = ModelComparisonTally.NONE; /// /// How many comparisons of the two there are. /// public int ComparisonCount { get; init; } /// /// The share of the decided votes which the first model won, with how sure that share is. /// public ModelComparisonWinShare WinShareOfFirstByVotes => ModelComparisonWinShare.Of(this.Votes.FirstModelWins, this.Votes.SecondModelWins); /// /// The share of the decided verdicts of the judges which the first model won, with how sure that share is. /// public ModelComparisonWinShare WinShareOfFirstByJudges => ModelComparisonWinShare.Of(this.JudgeVerdicts.FirstModelWins, this.JudgeVerdicts.SecondModelWins); }