Skip to content

LangfuseExperimentItemScopeProvider TCase,TOutput

NexusLabs.Foundry.Langfuse

LangfuseExperimentItemScopeProvider<TCase,TOutput> Class

Creates one Langfuse scenario trace for each statistical trial and reactivates it around every retry attempt and item evaluation.

public sealed class LangfuseExperimentItemScopeProvider<TCase,TOutput> : NexusLabs.Foundry.Evaluation.Experiments.IExperimentItemScopeProvider<TCase, TOutput>

Type parameters

TCase

The caller-owned case value type.

TOutput

The caller-owned output type.

Inheritance System.Object 🡒 LangfuseExperimentItemScopeProvider\<TCase,TOutput>

Implements NexusLabs.Foundry.Evaluation.Experiments.IExperimentItemScopeProvider<TCase,TOutput>

Fields

LangfuseExperimentItemScopeProvider<TCase,TOutput>.CorrelationNamespace Field

Gets the namespace used for Langfuse item correlations.

public const string CorrelationNamespace = "langfuse";

Field Value

System.String

LangfuseExperimentItemScopeProvider<TCase,TOutput>.DatasetRunIdCorrelationName Field

Gets the dataset-run-id correlation name.

public const string DatasetRunIdCorrelationName = "dataset.run.id";

Field Value

System.String

LangfuseExperimentItemScopeProvider<TCase,TOutput>.DatasetRunItemIdCorrelationName Field

Gets the dataset-run-item-id correlation name.

public const string DatasetRunItemIdCorrelationName = "dataset.run.item.id";

Field Value

System.String

LangfuseExperimentItemScopeProvider<TCase,TOutput>.DefaultScenarioName Field

Gets the default low-cardinality scenario trace name.

public const string DefaultScenarioName = "evaluate-experiment-item";

Field Value

System.String

LangfuseExperimentItemScopeProvider<TCase,TOutput>.ProviderName Field

Gets the provider name used in item publication results.

public const string ProviderName = "langfuse";

Field Value

System.String

LangfuseExperimentItemScopeProvider<TCase,TOutput>.TraceIdCorrelationName Field

Gets the trace-id correlation name.

public const string TraceIdCorrelationName = "trace.id";

Field Value

System.String

Properties

LangfuseExperimentItemScopeProvider<TCase,TOutput>.FailureMode Property

Gets the behavior for entry or activation failure before a task attempt.

public NexusLabs.Foundry.Evaluation.Experiments.ExperimentItemScopeFailureMode FailureMode { get; }

Implements FailureMode

Property Value

NexusLabs.Foundry.Evaluation.Experiments.ExperimentItemScopeFailureMode

LangfuseExperimentItemScopeProvider<TCase,TOutput>.IsRequired Property

Gets a value indicating whether publication failure is required for aggregate publication health.

public bool IsRequired { get; }

Implements IsRequired

Property Value

System.Boolean

LangfuseExperimentItemScopeProvider<TCase,TOutput>.Name Property

Gets the unique provider name used in item publication results.

public string Name { get; }

Implements Name

Property Value

System.String

Methods

LangfuseExperimentItemScopeProvider<TCase,TOutput>.EnterAsync(ExperimentItemScopeContext<TCase>, CancellationToken) Method

Enters one scope for a statistical trial.

public System.Threading.Tasks.ValueTask<NexusLabs.Foundry.Evaluation.Experiments.IExperimentItemScope<TCase,TOutput>> EnterAsync(NexusLabs.Foundry.Evaluation.Experiments.ExperimentItemScopeContext<TCase> context, System.Threading.CancellationToken cancellationToken);

Parameters

context NexusLabs.Foundry.Evaluation.Experiments.ExperimentItemScopeContext<TCase>

The stable trial identity and case data.

cancellationToken System.Threading.CancellationToken

The caller cancellation token.

Implements EnterAsync(ExperimentItemScopeContext<TCase>, CancellationToken)

Returns

System.Threading.Tasks.ValueTask<NexusLabs.Foundry.Evaluation.Experiments.IExperimentItemScope<TCase,TOutput>>
The entered item scope.

Remarks

The runner invokes this once per trial under the caller token and shared concurrency lease, but outside the per-attempt timeout. The returned scope remains alive across retry delays.