# RunScore

> Tracon documentation. Tracon is a .NET package family that adds a control
> plane on Microsoft Agent Framework, published as NuGet packages that run
> inside your own ASP.NET Core application.
>
> Page: https://tracon.dev/api/tracon.runscore/
> Summary: RunScore: A human (or judge) score for a run or for a single message within a run.

<div class="api-provenance">Namespace Tracon · Assembly <code>Tracon.Abstractions.dll</code></div>

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

```csharp
public sealed record RunScore : IEquatable<RunScore>
```

<dl class="api-relations"><dt>Inheritance</dt><dd><a href="https://learn.microsoft.com/dotnet/api/system.object">object</a> ← <a href="/api/tracon.runscore/">RunScore</a></dd><dt>Implements</dt><dd><a href="https://learn.microsoft.com/dotnet/api/system.iequatable-1">IEquatable&lt;RunScore&gt;</a></dd><dt>Inherited Members</dt><dd><a href="https://learn.microsoft.com/dotnet/api/system.object.gettype">object.GetType()</a>, <a href="https://learn.microsoft.com/dotnet/api/system.object.tostring">object.ToString()</a>, <a href="https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object)">object.Equals(object?)</a>, <a href="https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object-system-object)">object.Equals(object?, object?)</a>, <a href="https://learn.microsoft.com/dotnet/api/system.object.referenceequals">object.ReferenceEquals(object?, object?)</a>, <a href="https://learn.microsoft.com/dotnet/api/system.object.gethashcode">object.GetHashCode()</a></dd></dl>

## Remarks

If [RunScore.MessageId](/api/tracon.runscore/#Tracon_RunScore_MessageId) is empty, the score belongs to
**the whole run**; if set, it belongs to a single message.

An author ([RunScore.Author](/api/tracon.runscore/#Tracon_RunScore_Author)) writes the same [RunScore.Name](/api/tracon.runscore/#Tracon_RunScore_Name) onto the
same target (a run or a message) once — a second write updates the existing
row, [IRunScoreStore.UpsertAsync](/api/tracon.irunscorestore/#Tracon_IRunScoreStore_UpsertAsync_Tracon_RunScore_System_Threading_CancellationToken_). 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](/api/tracon.runscore/#Tracon_RunScore_Author) is empty (an identity-less setup), this rule does not
apply; every call opens a new row.

## Constructors

### <a id="Tracon_RunScore__ctor"></a> RunScore\(\)

```csharp
public RunScore()
```

## Properties

### <a id="Tracon_RunScore_Author"></a> Author

The actor who gave the score. [null](https://learn.microsoft.com/dotnet/csharp/language-reference/keywords/null) in an identity-less setup.

```csharp
public string? Author { get; init; }
```

#### Property Value

 [string](https://learn.microsoft.com/dotnet/api/system.string)?

### <a id="Tracon_RunScore_Comment"></a> Comment

A free-text comment.

```csharp
public string? Comment { get; init; }
```

#### Property Value

 [string](https://learn.microsoft.com/dotnet/api/system.string)?

### <a id="Tracon_RunScore_CreatedAt"></a> CreatedAt

The creation/last-updated time.

```csharp
public DateTimeOffset CreatedAt { get; init; }
```

#### Property Value

 [DateTimeOffset](https://learn.microsoft.com/dotnet/api/system.datetimeoffset)

### <a id="Tracon_RunScore_EvaluatorVersion"></a> EvaluatorVersion

The version of the component that produced this score, when one is known.

```csharp
public string? EvaluatorVersion { get; init; }
```

#### Property Value

 [string](https://learn.microsoft.com/dotnet/api/system.string)?

#### Remarks

[null](https://learn.microsoft.com/dotnet/csharp/language-reference/keywords/null) means **no version was resolved** —
a human or API score, or a judge that reports none. It never means
"version zero", the same rule [RunScore.Value](/api/tracon.runscore/#Tracon_RunScore_Value) already states.

A judge that bridges an evaluation package scores against that package's
prompt, so upgrading the package can move a regression baseline while
the model stays the same. This field is what separates the two. It is
written from [RunJudgment.EvaluatorVersion](/api/tracon.runjudgment/#Tracon_RunJudgment_EvaluatorVersion) and is at most
[RunScoreRules.MaxEvaluatorVersionLength](/api/tracon.runscorerules/#Tracon_RunScoreRules_MaxEvaluatorVersionLength) characters.

### <a id="Tracon_RunScore_Id"></a> Id

The score's identifier.

```csharp
public Guid Id { get; init; }
```

#### Property Value

 [Guid](https://learn.microsoft.com/dotnet/api/system.guid)

### <a id="Tracon_RunScore_Kind"></a> Kind

The shape of the value.

```csharp
public required RunScoreKind Kind { get; init; }
```

#### Property Value

 [RunScoreKind](/api/tracon.runscorekind/)

### <a id="Tracon_RunScore_MessageId"></a> MessageId

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

```csharp
public string? MessageId { get; init; }
```

#### Property Value

 [string](https://learn.microsoft.com/dotnet/api/system.string)?

### <a id="Tracon_RunScore_Name"></a> Name

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

```csharp
public required string Name { get; init; }
```

#### Property Value

 [string](https://learn.microsoft.com/dotnet/api/system.string)

#### Remarks

Must match `[A-Za-z0-9._-]{1,64}`, the same rule as
[IRunJudge.Name](/api/tracon.irunjudge/#Tracon_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](/api/tracon.runscorerules/) carries the rule.

### <a id="Tracon_RunScore_RunId"></a> RunId

The identifier of the run being scored.

```csharp
public required Guid RunId { get; init; }
```

#### Property Value

 [Guid](https://learn.microsoft.com/dotnet/api/system.guid)

### <a id="Tracon_RunScore_Source"></a> Source

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

```csharp
public required string Source { get; init; }
```

#### Property Value

 [string](https://learn.microsoft.com/dotnet/api/system.string)

### <a id="Tracon_RunScore_TenantId"></a> TenantId

The tenant.

```csharp
public required string TenantId { get; init; }
```

#### Property Value

 [string](https://learn.microsoft.com/dotnet/api/system.string)

### <a id="Tracon_RunScore_TextValue"></a> TextValue

The categorical value. Set only for a [RunScoreKind.Categorical](/api/tracon.runscorekind/) score.

```csharp
public string? TextValue { get; init; }
```

#### Property Value

 [string](https://learn.microsoft.com/dotnet/api/system.string)?

#### Remarks

At most [RunScoreRules.MaxTextValueLength](/api/tracon.runscorerules/#Tracon_RunScoreRules_MaxTextValueLength) characters; free-form prose belongs in [RunScore.Comment](/api/tracon.runscore/#Tracon_RunScore_Comment).

### <a id="Tracon_RunScore_Value"></a> Value

The numeric value: 0/1 for [RunScoreKind.Binary](/api/tracon.runscorekind/), 1 to 5 for
[RunScoreKind.Stars](/api/tracon.runscorekind/), 0 to 100 for
[RunScoreKind.Numeric](/api/tracon.runscorekind/).

```csharp
public double? Value { get; init; }
```

#### Property Value

 [double](https://learn.microsoft.com/dotnet/api/system.double)?

#### Remarks

[null](https://learn.microsoft.com/dotnet/csharp/language-reference/keywords/null) means **no measurement was made**,
not zero — the same rule [JudgeScore.Value](/api/tracon.judgescore/#Tracon_JudgeScore_Value) already states.
Always [null](https://learn.microsoft.com/dotnet/csharp/language-reference/keywords/null) when [RunScore.Kind](/api/tracon.runscore/#Tracon_RunScore_Kind) is
[RunScoreKind.Categorical](/api/tracon.runscorekind/).

## Methods

### <a id="Tracon_RunScore_Equals_System_Object_"></a> Equals\(object?\)

```csharp
public override bool Equals(object? obj)
```

#### Parameters

`obj` [object](https://learn.microsoft.com/dotnet/api/system.object)?

#### Returns

 [bool](https://learn.microsoft.com/dotnet/api/system.boolean)

### <a id="Tracon_RunScore_Equals_Tracon_RunScore_"></a> Equals\(RunScore?\)

```csharp
public bool Equals(RunScore? other)
```

#### Parameters

`other` [RunScore](/api/tracon.runscore/)?

#### Returns

 [bool](https://learn.microsoft.com/dotnet/api/system.boolean)

### <a id="Tracon_RunScore_GetHashCode"></a> GetHashCode\(\)

```csharp
public override int GetHashCode()
```

#### Returns

 [int](https://learn.microsoft.com/dotnet/api/system.int32)

### <a id="Tracon_RunScore_ToString"></a> ToString\(\)

```csharp
public override string ToString()
```

#### Returns

 [string](https://learn.microsoft.com/dotnet/api/system.string)

## Operators

### <a id="Tracon_RunScore_op_Equality_Tracon_RunScore_Tracon_RunScore_"></a> operator ==\(RunScore?, RunScore?\)

```csharp
public static bool operator ==(RunScore? left, RunScore? right)
```

#### Parameters

`left` [RunScore](/api/tracon.runscore/)?

`right` [RunScore](/api/tracon.runscore/)?

#### Returns

 [bool](https://learn.microsoft.com/dotnet/api/system.boolean)

### <a id="Tracon_RunScore_op_Inequality_Tracon_RunScore_Tracon_RunScore_"></a> operator \!=\(RunScore?, RunScore?\)

```csharp
public static bool operator !=(RunScore? left, RunScore? right)
```

#### Parameters

`left` [RunScore](/api/tracon.runscore/)?

`right` [RunScore](/api/tracon.runscore/)?

#### Returns

 [bool](https://learn.microsoft.com/dotnet/api/system.boolean)
