Langfuse JS/TS SDKs
    Preparing search index...

    Type Alias PromptVariableMappingSource

    PromptVariableMappingSource:
        | "input"
        | "output"
        | "metadata"
        | "tool_calls"
        | "expected_output"
        | "experiment_item_metadata"

    Source field used to populate a prompt variable.

    Use these values when mapping evaluator prompt variables to live data.

    Source semantics:

    • input: the observation input payload
    • output: the observation output payload
    • metadata: the observation metadata object. Combine with jsonPath when you need one nested field instead of the whole object.
    • tool_calls: the tool calls recorded on the observation, as an array of {id, name, arguments, type, index} objects in the order the model emitted them. Combine with jsonPath (for example $[*].name) to select parts of each call.
    • expected_output: the experiment item's expected output when the observation belongs to an experiment.
    • experiment_item_metadata: the experiment item's metadata when the observation belongs to an experiment.