Skip to content
Tracon

RunScore

Namespace Tracon · Assembly Tracon.Abstractions.dll

A human (or judge) score for a run or for a single message within a run.

public sealed record RunScore : IEquatable<RunScore>

objectRunScore

IEquatable<RunScore>

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

If RunScore.MessageId is empty, the score belongs to the whole run; if set, it belongs to a single message.

An author (RunScore.Author) writes the same RunScore.Name onto the same target (a run or a message) once — a second write updates the existing row, IRunScoreStore.UpsertAsync. A different name from the same author opens a new row, so one reviewer can score the same run for helpfulness and for accuracy side by side. When RunScore.Author is empty (an identity-less setup), this rule does not apply; every call opens a new row.

public RunScore()

The actor who gave the score. null in an identity-less setup.

public string? Author { get; init; }

string?

A free-text comment.

public string? Comment { get; init; }

string?

The creation/last-updated time.

public DateTimeOffset CreatedAt { get; init; }

DateTimeOffset

The score’s identifier.

public Guid Id { get; init; }

Guid

The shape of the value.

public required RunScoreKind Kind { get; init; }

RunScoreKind

The identifier of the message being scored. If empty, the score belongs to the whole run.

public string? MessageId { get; init; }

string?

The score’s stable, low-cardinality name — part of the uniqueness key.

public required string Name { get; init; }

string

Must match [A-Za-z0-9._-]{1,64}, the same rule as IRunJudge.Name. It is used as a metric tag and as a score field, so it must stay low-cardinality; a run identifier or a timestamp does not belong here. RunScoreRules carries the rule.

The identifier of the run being scored.

public required Guid RunId { get; init; }

Guid

The score’s source: human, api, or judge:{name}.

public required string Source { get; init; }

string

The tenant.

public required string TenantId { get; init; }

string

The categorical value. Set only for a RunScoreKind.Categorical score.

public string? TextValue { get; init; }

string?

At most RunScoreRules.MaxTextValueLength characters; free-form prose belongs in RunScore.Comment.

The numeric value: 0/1 for RunScoreKind.Binary, 1 to 5 for RunScoreKind.Stars, 0 to 100 for RunScoreKind.Numeric.

public double? Value { get; init; }

double?

null means no measurement was made, not zero — the same rule JudgeScore.Value already states. Always null when RunScore.Kind is RunScoreKind.Categorical.

public override bool Equals(object? obj)

obj object?

bool

public bool Equals(RunScore? other)

other RunScore?

bool

public override int GetHashCode()

int

public override string ToString()

string

public static bool operator ==(RunScore? left, RunScore? right)

left RunScore?

right RunScore?

bool

public static bool operator !=(RunScore? left, RunScore? right)

left RunScore?

right RunScore?

bool