Skip to content

LangfuseDatasetItem

NexusLabs.Needlr.AgentFramework.Langfuse

LangfuseDatasetItem Class

A single Langfuse dataset item — one eval case. Upserted via UpsertItemAsync(LangfuseDatasetItem, CancellationToken) and later referenced by an experiment run.

public sealed record LangfuseDatasetItem : System.IEquatable<NexusLabs.Needlr.AgentFramework.Langfuse.LangfuseDatasetItem>

Inheritance System.Object 🡒 LangfuseDatasetItem

Implements System.IEquatable<LangfuseDatasetItem>

Remarks

Input, ExpectedOutput, and Metadata are serialized to JSON, so a string, anonymous object, dictionary, or POCO are all valid.

Properties

LangfuseDatasetItem.DatasetName Property

Gets the name of the dataset this item belongs to.

public string DatasetName { get; init; }

Property Value

System.String

LangfuseDatasetItem.ExpectedOutput Property

Gets the expected output used as the reference for scoring.

public object? ExpectedOutput { get; init; }

Property Value

System.Object

LangfuseDatasetItem.Id Property

Gets the stable item id used for upsert. Reusing the same id updates the item rather than creating a duplicate. Recommended so re-running an eval suite does not duplicate items.

public string? Id { get; init; }

Property Value

System.String

LangfuseDatasetItem.Input Property

Gets the item input (the eval prompt or request).

public object? Input { get; init; }

Property Value

System.Object

LangfuseDatasetItem.Metadata Property

Gets optional metadata stored alongside the item.

public object? Metadata { get; init; }

Property Value

System.Object

LangfuseDatasetItem.SourceObservationId Property

Gets the optional id of a production observation this item was curated from.

public string? SourceObservationId { get; init; }

Property Value

System.String

LangfuseDatasetItem.SourceTraceId Property

Gets the optional id of a production trace this item was curated from.

public string? SourceTraceId { get; init; }

Property Value

System.String