Skip to content

EvaluationThresholdEvaluator

NexusLabs.Foundry.Evaluation

NexusLabs.Foundry.Evaluation

EvaluationThresholdEvaluator Class

Configures and evaluates reusable structured metric thresholds.

public sealed class EvaluationThresholdEvaluator

Inheritance System.Object 🡒 EvaluationThresholdEvaluator

Remarks

Configure an instance before sharing it across concurrent evaluations. Evaluation copies the configured threshold list before reading metrics.

Methods

EvaluationThresholdEvaluator.Evaluate(EvaluationResult[]) Method

Evaluates configured thresholds against one or more MEAI evaluation results.

public NexusLabs.Foundry.Evaluation.EvaluationThresholdResult Evaluate(params Microsoft.Extensions.AI.Evaluation.EvaluationResult[] results);

Parameters

results Microsoft.Extensions.AI.Evaluation.EvaluationResult[]

The results searched in order; the first metric-name match wins.

Returns

EvaluationThresholdResult
The structured threshold result.

EvaluationThresholdEvaluator.Evaluate(EvaluationMissingMetricBehavior, EvaluationResult[]) Method

Evaluates configured thresholds against one or more MEAI evaluation results.

public NexusLabs.Foundry.Evaluation.EvaluationThresholdResult Evaluate(NexusLabs.Foundry.Evaluation.EvaluationMissingMetricBehavior missingMetricBehavior, params Microsoft.Extensions.AI.Evaluation.EvaluationResult[] results);

Parameters

missingMetricBehavior EvaluationMissingMetricBehavior

The treatment for required missing or invalid metrics.

results Microsoft.Extensions.AI.Evaluation.EvaluationResult[]

The results searched in order; the first metric-name match wins.

Returns

EvaluationThresholdResult
The structured threshold result.

EvaluationThresholdEvaluator.OptionalBoolean(string, bool) Method

Adds a boolean threshold that permits the metric to be absent.

public NexusLabs.Foundry.Evaluation.EvaluationThresholdEvaluator OptionalBoolean(string metricName, bool expected);

Parameters

metricName System.String

The metric name.

expected System.Boolean

The required value when the metric is present.

Returns

EvaluationThresholdEvaluator
This evaluator for fluent configuration.

EvaluationThresholdEvaluator.OptionalNumericMax(string, double) Method

Adds a numeric maximum threshold that permits the metric to be absent.

public NexusLabs.Foundry.Evaluation.EvaluationThresholdEvaluator OptionalNumericMax(string metricName, double max);

Parameters

metricName System.String

The metric name.

max System.Double

The inclusive maximum.

Returns

EvaluationThresholdEvaluator
This evaluator for fluent configuration.

EvaluationThresholdEvaluator.OptionalNumericMin(string, double) Method

Adds a numeric minimum threshold that permits the metric to be absent.

public NexusLabs.Foundry.Evaluation.EvaluationThresholdEvaluator OptionalNumericMin(string metricName, double min);

Parameters

metricName System.String

The metric name.

min System.Double

The inclusive minimum.

Returns

EvaluationThresholdEvaluator
This evaluator for fluent configuration.

EvaluationThresholdEvaluator.RequireBoolean(string, bool) Method

Adds a required boolean threshold.

public NexusLabs.Foundry.Evaluation.EvaluationThresholdEvaluator RequireBoolean(string metricName, bool expected);

Parameters

metricName System.String

The metric name.

expected System.Boolean

The required value.

Returns

EvaluationThresholdEvaluator
This evaluator for fluent configuration.

EvaluationThresholdEvaluator.RequireNumericMax(string, double) Method

Adds a required numeric maximum threshold.

public NexusLabs.Foundry.Evaluation.EvaluationThresholdEvaluator RequireNumericMax(string metricName, double max);

Parameters

metricName System.String

The metric name.

max System.Double

The inclusive maximum.

Returns

EvaluationThresholdEvaluator
This evaluator for fluent configuration.

EvaluationThresholdEvaluator.RequireNumericMin(string, double) Method

Adds a required numeric minimum threshold.

public NexusLabs.Foundry.Evaluation.EvaluationThresholdEvaluator RequireNumericMin(string metricName, double min);

Parameters

metricName System.String

The metric name.

min System.Double

The inclusive minimum.

Returns

EvaluationThresholdEvaluator
This evaluator for fluent configuration.