AgentEvaluationResults.AssertScoreAtLeast(Double, String, String) Method

Definition

Asserts that every per-evaluator score on every item is at least minScore.

public void AssertScoreAtLeast(double minScore, string? evaluator = default, string? message = default);
member this.AssertScoreAtLeast : double * string * string -> unit
Public Sub AssertScoreAtLeast (minScore As Double, Optional evaluator As String = Nothing, Optional message As String = Nothing)

Parameters

minScore
Double

Minimum acceptable score (inclusive).

evaluator
String

When set, only check scores whose Name matches.

message
String

Optional custom failure message.

Exceptions

Thrown when any matching score is below the threshold.

Remarks

Designed for CI gates on generated rubric evaluators (for example results.AssertScoreAtLeast(0.80)). Walks DetailedItems across this result and any SubResults from workflow evaluations.

When DetailedItems is null, the assertion is a no-op for this level. Providers that surface per-evaluator scores (such as Foundry) populate DetailedItems; providers that only emit aggregate Items metrics do not.

Applies to