mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2026-11-14 22:08:27 +00:00
Added the Model Comparison assistant for blind comparisons of two models (#1009)
Co-authored-by: Thorsten Sommer <SommerEngineering@users.noreply.github.com>
This commit is contained in:
1 parent
12f26445ba
commit
b7255694cd
221 files changed
+19989
-90
No files matched your search
+45
@@ -0,0 +1,45 @@
|
||||
using AIStudio.Components;
|
||||
|
||||
using Microsoft.AspNetCore.Components;
|
||||
|
||||
namespace AIStudio.Assistants.ModelComparison;
|
||||
|
||||
/// <summary>
|
||||
/// The result of a comparison series, with the names of the models: who won the blind tasks, whether the order of the
|
||||
/// chats mattered, how often the judge agreed, and how much effort each model took.
|
||||
/// </summary>
|
||||
public partial class ModelComparisonSeriesResult : MSGComponentBase
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets or sets the statistics of the series.
|
||||
/// </summary>
|
||||
[Parameter, EditorRequired]
|
||||
public ModelComparisonSeriesStatistics Statistics { get; set; } = null!;
|
||||
|
||||
private IReadOnlyList<ModelComparisonSeriesEffort> Efforts => [this.Statistics.FirstEffort, this.Statistics.SecondEffort];
|
||||
|
||||
private string BlindTasksText => string.Format(ModelComparisonFormat.Culture, T("Tasks decided without knowing the models: {0}"), this.Statistics.Pairing.ComparisonCount.CompactCount());
|
||||
|
||||
private string ChatOrderText => string.Format(
|
||||
ModelComparisonFormat.Culture,
|
||||
TA("The model in the first chat won {0} of these tasks, the model in the second chat {1}. If the second chat wins much more often, knowing the task better may have helped you there."),
|
||||
this.Statistics.WinsOfChatOne.CompactCount(),
|
||||
this.Statistics.WinsOfChatTwo.CompactCount());
|
||||
|
||||
private string NotBlindText
|
||||
{
|
||||
get
|
||||
{
|
||||
var votes = this.Statistics.NotBlindVotes;
|
||||
return string.Format(
|
||||
ModelComparisonFormat.Culture,
|
||||
TA("After you saw the result, you decided {0} more tasks: {1} won {2}, {3} won {4}, and {5} ended equally. They do not count above, since you knew the models."),
|
||||
votes.TotalRunCount.CompactCount(),
|
||||
this.Statistics.Pairing.First.Label,
|
||||
votes.FirstModelWins.CompactCount(),
|
||||
this.Statistics.Pairing.Second.Label,
|
||||
votes.SecondModelWins.CompactCount(),
|
||||
votes.Ties.CompactCount());
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user