| | | 1 | | namespace NexusLabs.Needlr.AgentFramework.Langfuse; |
| | | 2 | | |
| | | 3 | | /// <summary> |
| | | 4 | | /// A single Langfuse dataset item — one eval case. Upserted via |
| | | 5 | | /// <see cref="ILangfuseDatasetClient.UpsertItemAsync"/> and later referenced by an experiment run. |
| | | 6 | | /// </summary> |
| | | 7 | | /// <remarks> |
| | | 8 | | /// <see cref="Input"/>, <see cref="ExpectedOutput"/>, and <see cref="Metadata"/> are serialized to |
| | | 9 | | /// JSON, so a string, anonymous object, dictionary, or POCO are all valid. |
| | | 10 | | /// </remarks> |
| | | 11 | | public sealed record LangfuseDatasetItem |
| | | 12 | | { |
| | | 13 | | /// <summary>Gets the name of the dataset this item belongs to.</summary> |
| | 3 | 14 | | public required string DatasetName { get; init; } |
| | | 15 | | |
| | | 16 | | /// <summary> |
| | | 17 | | /// Gets the stable item id used for upsert. Reusing the same id updates the item rather than |
| | | 18 | | /// creating a duplicate. Recommended so re-running an eval suite does not duplicate items. |
| | | 19 | | /// </summary> |
| | 2 | 20 | | public string? Id { get; init; } |
| | | 21 | | |
| | | 22 | | /// <summary>Gets the item input (the eval prompt or request).</summary> |
| | 2 | 23 | | public object? Input { get; init; } |
| | | 24 | | |
| | | 25 | | /// <summary>Gets the expected output used as the reference for scoring.</summary> |
| | 2 | 26 | | public object? ExpectedOutput { get; init; } |
| | | 27 | | |
| | | 28 | | /// <summary>Gets optional metadata stored alongside the item.</summary> |
| | 1 | 29 | | public object? Metadata { get; init; } |
| | | 30 | | |
| | | 31 | | /// <summary>Gets the optional id of a production trace this item was curated from.</summary> |
| | 1 | 32 | | public string? SourceTraceId { get; init; } |
| | | 33 | | |
| | | 34 | | /// <summary>Gets the optional id of a production observation this item was curated from.</summary> |
| | 1 | 35 | | public string? SourceObservationId { get; init; } |
| | | 36 | | } |