ExperimentItemResult TCase,TOutput
NexusLabs.Foundry.Evaluation¶
NexusLabs.Foundry.Evaluation.Experiments¶
ExperimentItemResult<TCase,TOutput> Class¶
Describes one case trial, including its complete attempt history and terminal output.
public sealed record ExperimentItemResult<TCase,TOutput> : System.IEquatable<NexusLabs.Foundry.Evaluation.Experiments.ExperimentItemResult<TCase, TOutput>>
Type parameters¶
TCase
The caller-owned case value type.
TOutput
The caller-owned output type.
Inheritance System.Object 🡒 ExperimentItemResult\<TCase,TOutput>
Implements System.IEquatable<NexusLabs.Foundry.Evaluation.Experiments.ExperimentItemResult<TCase,TOutput>>
Properties¶
ExperimentItemResult<TCase,TOutput>.Attempts Property¶
Gets every operational attempt in order.
public System.Collections.Generic.IReadOnlyList<NexusLabs.Foundry.Evaluation.Experiments.ExperimentAttemptResult> Attempts { get; }
Property Value¶
System.Collections.Generic.IReadOnlyList<ExperimentAttemptResult>
ExperimentItemResult<TCase,TOutput>.Case Property¶
Gets the materialized case.
Property Value¶
NexusLabs.Foundry.Evaluation.Experiments.ExperimentCase<TCase>
ExperimentItemResult<TCase,TOutput>.Correlations Property¶
Gets namespaced provider identifiers in item-scope registration order.
public System.Collections.Generic.IReadOnlyList<NexusLabs.Foundry.Evaluation.Experiments.ExperimentItemCorrelation> Correlations { get; }
Property Value¶
System.Collections.Generic.IReadOnlyList<ExperimentItemCorrelation>
ExperimentItemResult<TCase,TOutput>.Evaluation Property¶
Gets the mutable MEAI evaluation result, when evaluation succeeded.
Property Value¶
Microsoft.Extensions.AI.Evaluation.EvaluationResult
ExperimentItemResult<TCase,TOutput>.Failure Property¶
Gets the structured terminal failure, when present.
Property Value¶
ExperimentItemResult<TCase,TOutput>.HasOutput Property¶
Gets a value indicating whether Output contains a task output.
Property Value¶
ExperimentItemResult<TCase,TOutput>.Metrics Property¶
Gets immutable normalized metric snapshots.
public System.Collections.Generic.IReadOnlyList<NexusLabs.Foundry.Evaluation.Experiments.ExperimentMetricSnapshot> Metrics { get; }
Property Value¶
System.Collections.Generic.IReadOnlyList<ExperimentMetricSnapshot>
ExperimentItemResult<TCase,TOutput>.Output Property¶
Gets the terminal successful output, when available.
Property Value¶
ExperimentItemResult<TCase,TOutput>.Publications Property¶
Gets item-scope publication results in registration order.
public System.Collections.Generic.IReadOnlyList<NexusLabs.Foundry.Evaluation.Experiments.ExperimentItemPublicationResult> Publications { get; }
Property Value¶
System.Collections.Generic.IReadOnlyList<ExperimentItemPublicationResult>
ExperimentItemResult<TCase,TOutput>.Sequence Property¶
Gets the zero-based stable sequence.
Property Value¶
ExperimentItemResult<TCase,TOutput>.Status Property¶
Gets the terminal item status.
Property Value¶
ExperimentItemResult<TCase,TOutput>.TrialIndex Property¶
Gets the one-based statistical trial index.
Property Value¶
Methods¶
ExperimentItemResult<TCase,TOutput>.EvaluationFailed(int, ExperimentCase<TCase>, int, IReadOnlyList<ExperimentAttemptResult>, TOutput, ExperimentFailure, IReadOnlyList<ExperimentItemPublicationResult>) Method¶
Creates an item result whose task succeeded but item evaluation failed.
public static NexusLabs.Foundry.Evaluation.Experiments.ExperimentItemResult<TCase,TOutput> EvaluationFailed(int sequence, NexusLabs.Foundry.Evaluation.Experiments.ExperimentCase<TCase> @case, int trialIndex, System.Collections.Generic.IReadOnlyList<NexusLabs.Foundry.Evaluation.Experiments.ExperimentAttemptResult> attempts, TOutput? output, NexusLabs.Foundry.Evaluation.Experiments.ExperimentFailure failure, System.Collections.Generic.IReadOnlyList<NexusLabs.Foundry.Evaluation.Experiments.ExperimentItemPublicationResult> publications);
Parameters¶
sequence System.Int32
The zero-based stable item sequence.
case NexusLabs.Foundry.Evaluation.Experiments.ExperimentCase<TCase>
The materialized experiment case.
trialIndex System.Int32
The one-based statistical trial index.
attempts System.Collections.Generic.IReadOnlyList<ExperimentAttemptResult>
The complete ordered attempt history.
output TOutput
The successful task output, which may be null.
failure ExperimentFailure
The structured item-evaluation failure.
publications System.Collections.Generic.IReadOnlyList<ExperimentItemPublicationResult>
The item-scope publication results.
Returns¶
NexusLabs.Foundry.Evaluation.Experiments.ExperimentItemResult<TCase,TOutput>
A canonical evaluation-failed item result.
Exceptions¶
System.ArgumentException
Identity, attempts, publication identity, or failure shape is invalid.
System.ArgumentNullException
case, attempts, failure,
publications, or an owned collection element is
null.
System.ArgumentOutOfRangeException
sequence or trialIndex is outside its supported range.
Remarks¶
The final attempt must be successful and the failure must use the item-evaluation failure code and stage.
ExperimentItemResult<TCase,TOutput>.Failed(int, ExperimentCase<TCase>, int, ExperimentItemStatus, IReadOnlyList<ExperimentAttemptResult>, ExperimentFailure, IReadOnlyList<ExperimentItemPublicationResult>) Method¶
Creates an item result for execution, cancellation, timeout, or prerequisite failure.
public static NexusLabs.Foundry.Evaluation.Experiments.ExperimentItemResult<TCase,TOutput> Failed(int sequence, NexusLabs.Foundry.Evaluation.Experiments.ExperimentCase<TCase> @case, int trialIndex, NexusLabs.Foundry.Evaluation.Experiments.ExperimentItemStatus status, System.Collections.Generic.IReadOnlyList<NexusLabs.Foundry.Evaluation.Experiments.ExperimentAttemptResult> attempts, NexusLabs.Foundry.Evaluation.Experiments.ExperimentFailure failure, System.Collections.Generic.IReadOnlyList<NexusLabs.Foundry.Evaluation.Experiments.ExperimentItemPublicationResult> publications);
Parameters¶
sequence System.Int32
The zero-based stable item sequence.
case NexusLabs.Foundry.Evaluation.Experiments.ExperimentCase<TCase>
The materialized experiment case.
trialIndex System.Int32
The one-based statistical trial index.
status ExperimentItemStatus
The terminal failed-item status.
attempts System.Collections.Generic.IReadOnlyList<ExperimentAttemptResult>
The complete ordered attempt history.
failure ExperimentFailure
The structured terminal failure.
publications System.Collections.Generic.IReadOnlyList<ExperimentItemPublicationResult>
The item-scope publication results.
Returns¶
NexusLabs.Foundry.Evaluation.Experiments.ExperimentItemResult<TCase,TOutput>
A canonical failed item result.
Exceptions¶
System.ArgumentException
Identity, item status, attempts, publication identity, or failure shape is invalid.
System.ArgumentNullException
case, attempts, failure,
publications, or an owned collection element is
null.
System.ArgumentOutOfRangeException
sequence or trialIndex is outside its supported range.
Remarks¶
The item status, final attempt status, failure code, and failure stage must describe the same terminal condition. Retry-policy failures are represented as execution-failed items with a policy-stage failure.
ExperimentItemResult<TCase,TOutput>.Succeeded(int, ExperimentCase<TCase>, int, IReadOnlyList<ExperimentAttemptResult>, TOutput, EvaluationResult, IReadOnlyList<ExperimentItemPublicationResult>) Method¶
Creates a successful item result, including a possibly null task output.
public static NexusLabs.Foundry.Evaluation.Experiments.ExperimentItemResult<TCase,TOutput> Succeeded(int sequence, NexusLabs.Foundry.Evaluation.Experiments.ExperimentCase<TCase> @case, int trialIndex, System.Collections.Generic.IReadOnlyList<NexusLabs.Foundry.Evaluation.Experiments.ExperimentAttemptResult> attempts, TOutput? output, Microsoft.Extensions.AI.Evaluation.EvaluationResult? evaluation, System.Collections.Generic.IReadOnlyList<NexusLabs.Foundry.Evaluation.Experiments.ExperimentItemPublicationResult> publications);
Parameters¶
sequence System.Int32
The zero-based stable item sequence.
case NexusLabs.Foundry.Evaluation.Experiments.ExperimentCase<TCase>
The materialized experiment case.
trialIndex System.Int32
The one-based statistical trial index.
attempts System.Collections.Generic.IReadOnlyList<ExperimentAttemptResult>
The complete ordered attempt history.
output TOutput
The task output, which may be null.
evaluation Microsoft.Extensions.AI.Evaluation.EvaluationResult
The optional successful MEAI evaluation result.
publications System.Collections.Generic.IReadOnlyList<ExperimentItemPublicationResult>
The item-scope publication results.
Returns¶
NexusLabs.Foundry.Evaluation.Experiments.ExperimentItemResult<TCase,TOutput>
A successful canonical item result.
Exceptions¶
System.ArgumentException
Case identity, tags, attempt numbering, final attempt status, or publication identity is
invalid.
System.ArgumentNullException
case, attempts, publications, or an
owned collection element is null.
System.ArgumentOutOfRangeException
sequence or trialIndex is outside its supported range.
Remarks¶
The final attempt must be successful. Foundry-owned collections and case tags are snapshotted.