ExperimentPolicyResult
NexusLabs.Foundry.Evaluation¶
NexusLabs.Foundry.Evaluation.Experiments¶
ExperimentPolicyResult Class¶
Describes one isolated experiment policy outcome.
public sealed record ExperimentPolicyResult : System.IEquatable<NexusLabs.Foundry.Evaluation.Experiments.ExperimentPolicyResult>
Inheritance System.Object 🡒 ExperimentPolicyResult
Implements System.IEquatable<ExperimentPolicyResult>
Properties¶
ExperimentPolicyResult.Decision Property¶
Gets the policy decision.
Property Value¶
ExperimentPolicyResult.DeterministicEvidence Property¶
Gets deterministic threshold evidence, when applicable.
public NexusLabs.Foundry.Evaluation.Experiments.ExperimentDeterministicPolicyEvidence? DeterministicEvidence { get; }
Property Value¶
ExperimentDeterministicPolicyEvidence
ExperimentPolicyResult.Failure Property¶
Gets the structured failure when policy execution failed.
Property Value¶
ExperimentPolicyResult.IsRequired Property¶
Gets a value indicating whether the policy contributes to the run decision.
Property Value¶
ExperimentPolicyResult.Kind Property¶
Gets the policy kind.
Property Value¶
ExperimentPolicyResult.Name Property¶
Gets the stable policy name.
Property Value¶
ExperimentPolicyResult.StatisticalEvidence Property¶
Gets binary statistical evidence, when applicable.
public NexusLabs.Foundry.Evaluation.Experiments.ExperimentBinaryStatisticalEvidence? StatisticalEvidence { get; }
Property Value¶
ExperimentBinaryStatisticalEvidence
Methods¶
ExperimentPolicyResult.ExecutionFailed(string, ExperimentPolicyKind, bool, ExperimentFailure) Method¶
Creates a canonical result for a policy execution failure.
public static NexusLabs.Foundry.Evaluation.Experiments.ExperimentPolicyResult ExecutionFailed(string name, NexusLabs.Foundry.Evaluation.Experiments.ExperimentPolicyKind kind, bool isRequired, NexusLabs.Foundry.Evaluation.Experiments.ExperimentFailure failure);
Parameters¶
name System.String
The stable policy name.
kind ExperimentPolicyKind
The policy kind.
isRequired System.Boolean
Whether the policy contributes to the run decision.
failure ExperimentFailure
The structured policy execution failure.
Returns¶
ExperimentPolicyResult
An inconclusive policy result containing the failure.
Exceptions¶
System.ArgumentException
name is blank or failure is not a non-retryable policy
execution failure.
System.ArgumentNullException
failure is null.
System.ArgumentOutOfRangeException
kind is undefined.
ExperimentPolicyResult.FromVerdict(string, ExperimentPolicyKind, bool, ExperimentPolicyVerdict) Method¶
Creates a canonical policy result from a successful policy verdict.
public static NexusLabs.Foundry.Evaluation.Experiments.ExperimentPolicyResult FromVerdict(string name, NexusLabs.Foundry.Evaluation.Experiments.ExperimentPolicyKind kind, bool isRequired, NexusLabs.Foundry.Evaluation.Experiments.ExperimentPolicyVerdict verdict);
Parameters¶
name System.String
The stable policy name.
kind ExperimentPolicyKind
The policy kind.
isRequired System.Boolean
Whether the policy contributes to the run decision.
verdict ExperimentPolicyVerdict
The validated policy verdict.
Returns¶
ExperimentPolicyResult
A canonical successful policy result.
Exceptions¶
System.ArgumentException
name is blank or verdict contains evidence that does
not match kind.
System.ArgumentNullException
verdict is null.
System.ArgumentOutOfRangeException
kind is undefined.