Skip to content

RunScore

Namespace AgentPrism · Assembly AgentPrism.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) scores the same target (a run or a message) once — a second write updates the existing row, IRunScoreStore.UpsertAsync. 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 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 identifier of the run being scored.

public required Guid RunId { get; init; }

Guid

The score’s source: human, api, or judge. Today only human is used; the column is set up from the start so online evaluation can write a judge score into the same table as-is.

public required string Source { get; init; }

string

The tenant.

public required string TenantId { get; init; }

string

The score value. 0/1 for RunScoreKind.Binary, 1.5 for RunScoreKind.Stars.

public required int Value { get; init; }

int

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