Langfuse JS/TS SDKs
    Preparing search index...

    Type Alias EvaluatorParams<Input, ExpectedOutput, Metadata>

    type EvaluatorParams<
        Input = any,
        ExpectedOutput = any,
        Metadata extends Record<string, any> = Record<string, any>,
    > = {
        expectedOutput?: ExpectedOutput;
        input: Input;
        metadata?: Metadata;
        output: any;
    }

    Type Parameters

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

    Properties

    expectedOutput?: ExpectedOutput

    The expected output for comparison (optional).

    This is the ground truth or expected result for the given input. May not be available for all evaluation scenarios.

    input: Input

    The original input data passed to the task.

    This is the same input that was provided to the task function. Use this for context-aware evaluations or input-output relationship analysis.

    metadata?: Metadata

    Optional metadata about the evaluation context.

    Contains additional information from the experiment item or dataset item that may be useful for evaluation logic, such as tags, categories, or other contextual data.

    output: any

    The output produced by the task.

    This is the actual result returned by your task function. This is the primary value to evaluate against expectations.