Skip to content

ExperimentVariantResult

Namespace AgentPrism · Assembly AgentPrism.Abstractions.dll

Summarizes run results for an experiment variant (calculated in the store).

public sealed record ExperimentVariantResult : IEquatable<ExperimentVariantResult>

objectExperimentVariantResult

IEquatable<ExperimentVariantResult>

object.GetType(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()

public ExperimentVariantResult()

Gets the average duration of settled runs in milliseconds. Returns null when no run is settled.

public double? AverageDurationMs { get; init; }

double?

Gets the average numeric score from 0 through 100 for runs assigned to this variant. It uses the RunScoreKind.Numeric scores written by online evaluation. Returns null when no run is scored. This is not 0; it means unknown, consistent with the existing RunCost contract.

public double? AverageScore { get; init; }

double?

Gets the number of cancelled runs.

public required long CanceledRuns { get; init; }

long

Gets the number of successfully completed runs.

public required long CompletedRuns { get; init; }

long

Gets the currency. It is populated when TotalCost is populated.

public string? Currency { get; init; }

string?

Gets the error rate among settled runs, from 0 through 1. It uses the same calculation as RunStatistics.ErrorRate.

public double? ErrorRate { get; }

double?

Gets the number of runs that ended with an error.

public required long FailedRuns { get; init; }

long

Gets the total input tokens.

public long InputTokens { get; init; }

long

Gets the total output tokens.

public long OutputTokens { get; init; }

long

Gets the total cost for this variant. Returns null when pricing is undefined.

public decimal? TotalCost { get; init; }

decimal?

Gets the total number of runs assigned to this variant.

public required long TotalRuns { get; init; }

long

Gets the total tokens.

public long TotalTokens { get; init; }

long

Gets the variant name.

public required string Variant { get; init; }

string

Gets the definition version served by the variant.

public required int Version { get; init; }

int

public override bool Equals(object? obj)

obj object?

bool

public bool Equals(ExperimentVariantResult? other)

other ExperimentVariantResult?

bool

public override int GetHashCode()

int

public override string ToString()

string

operator ==(ExperimentVariantResult?, ExperimentVariantResult?)

Section titled “ operator ==(ExperimentVariantResult?, ExperimentVariantResult?)”
public static bool operator ==(ExperimentVariantResult? left, ExperimentVariantResult? right)

left ExperimentVariantResult?

right ExperimentVariantResult?

bool

operator !=(ExperimentVariantResult?, ExperimentVariantResult?)

Section titled “ operator !=(ExperimentVariantResult?, ExperimentVariantResult?)”
public static bool operator !=(ExperimentVariantResult? left, ExperimentVariantResult? right)

left ExperimentVariantResult?

right ExperimentVariantResult?

bool