# OnlineEvaluationOptions

> 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.onlineevaluationoptions/
> Summary: OnlineEvaluationOptions: Online evaluation settings.

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

Online evaluation settings.

```csharp
public sealed class OnlineEvaluationOptions
```

<dl class="api-relations"><dt>Inheritance</dt><dd><a href="https://learn.microsoft.com/dotnet/api/system.object">object</a> ← <a href="/api/tracon.onlineevaluationoptions/">OnlineEvaluationOptions</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

Read from the `Tracon:OnlineEvaluation` configuration section.

**Two-gate default.** [OnlineEvaluationOptions.Enabled](/api/tracon.onlineevaluationoptions/#Tracon_OnlineEvaluationOptions_Enabled) defaults to
[false](https://learn.microsoft.com/dotnet/csharp/language-reference/builtin-types/bool) (the no-surprises default) AND
[OnlineEvaluationOptions.SampleRate](/api/tracon.onlineevaluationoptions/#Tracon_OnlineEvaluationOptions_SampleRate) defaults to `0.0`. Even when [OnlineEvaluationOptions.Enabled](/api/tracon.onlineevaluationoptions/#Tracon_OnlineEvaluationOptions_Enabled)
is turned on, no run is sampled, the judge model is never called, and not
a single cent is spent unless the rate is also given. The third defense is
[OnlineEvaluationOptions.MaxScoresPerHour](/api/tracon.onlineevaluationoptions/#Tracon_OnlineEvaluationOptions_MaxScoresPerHour): even if the sample rate is miscalculated,
there is still an upper bound.

## Constructors

### <a id="Tracon_OnlineEvaluationOptions__ctor"></a> OnlineEvaluationOptions\(\)

```csharp
public OnlineEvaluationOptions()
```

## Fields

### <a id="Tracon_OnlineEvaluationOptions_SectionName"></a> SectionName

Configuration section name.

```csharp
public const string SectionName = "Tracon:OnlineEvaluation"
```

#### Field Value

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

### <a id="Tracon_OnlineEvaluationOptions_AgentNames"></a> AgentNames

Only these agents are scored. Empty means all.

```csharp
public IList<string> AgentNames { get; }
```

#### Property Value

 [IList](https://learn.microsoft.com/dotnet/api/system.collections.generic.ilist\-1)<[string](https://learn.microsoft.com/dotnet/api/system.string)\>

### <a id="Tracon_OnlineEvaluationOptions_Enabled"></a> Enabled

Whether online evaluation is enabled. Default [false](https://learn.microsoft.com/dotnet/csharp/language-reference/builtin-types/bool).

```csharp
public bool Enabled { get; set; }
```

#### Property Value

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

Window for the average calculation.

```csharp
public TimeSpan EvaluationWindow { get; set; }
```

#### Property Value

 [TimeSpan](https://learn.microsoft.com/dotnet/api/system.timespan)

### <a id="Tracon_OnlineEvaluationOptions_JudgeTimeout"></a> JudgeTimeout

Maximum time allocated to one judge call.

```csharp
public TimeSpan JudgeTimeout { get; set; }
```

#### Property Value

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

The timeout applies to each registered judge independently. With N judges,
one online evaluation can take up to N times this value before retries.

### <a id="Tracon_OnlineEvaluationOptions_LowScoreThreshold"></a> LowScoreThreshold

Low-score threshold, on a 0-100 scale.

```csharp
public int LowScoreThreshold { get; set; }
```

#### Property Value

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

Maximum number of runs sampled per hour per tenant.

```csharp
public int MaxScoresPerHour { get; set; }
```

#### Property Value

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

The second line of defense for sampling: even if
[OnlineEvaluationOptions.SampleRate](/api/tracon.onlineevaluationoptions/#Tracon_OnlineEvaluationOptions_SampleRate) is miscalculated or traffic spikes, the
absolute cost is bounded by this cap.

### <a id="Tracon_OnlineEvaluationOptions_MinSampleSize"></a> MinSampleSize

Minimum sample size required for an alert. A single low score does not produce an alert.

```csharp
public int MinSampleSize { get; set; }
```

#### Property Value

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

The model is noisy; raising an alert from a single sample trains the
on-call engineer to start ignoring notifications.

### <a id="Tracon_OnlineEvaluationOptions_SampleRate"></a> SampleRate

Fraction of completed runs to sample, 0.0-1.0.

```csharp
public double SampleRate { get; set; }
```

#### Property Value

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

Default `0.0`: even when [OnlineEvaluationOptions.Enabled](/api/tracon.onlineevaluationoptions/#Tracon_OnlineEvaluationOptions_Enabled) is turned on,
nothing is scored unless the rate is also given. Sampling itself is
**deterministic** - it is derived from the hash of the run
id; the same run is never evaluated twice, and a retry does not roll a
new die.
