Langfuse JS/TS SDKs
    Preparing search index...

    Type Alias ExperimentItem<Input, ExpectedOutput, Metadata>

    ExperimentItem:
        | {
            expectedOutput?: ExpectedOutput;
            input?: Input;
            metadata?: Metadata;
        }
        | DatasetItem

    Type Parameters

    • Input = any
    • ExpectedOutput = any
    • Metadata extends Record<string, any> = Record<string, any>

    Type declaration

    • { expectedOutput?: ExpectedOutput; input?: Input; metadata?: Metadata }
      • OptionalexpectedOutput?: ExpectedOutput

        The expected output for evaluation purposes.

        Optional ground truth or reference output for this input. Used by evaluators to assess task performance. If not provided, only evaluators that don't require expected output can be used.

      • Optionalinput?: Input

        The input data to pass to the task function.

        Can be any type - string, object, array, etc. This data will be passed to your task function as the input parameter. Structure it according to your task's requirements.

      • Optionalmetadata?: Metadata

        Optional metadata to attach to the experiment item.

        Store additional context, tags, or custom data related to this specific item. This metadata will be available in traces and can be used for filtering, analysis, or custom evaluator logic.

    • DatasetItem