Langfuse JS/TS SDKs
    Preparing search index...

    Interface UpdateEvaluationRuleRequest

    Partial update body for an evaluation rule.

    Provide only the fields you want to change. An empty body is rejected.

    Practical guidance:

    • If you only want to rename the rule or change sampling, send just those fields.
    • If you change to an LLM-as-judge evaluator, send a fresh mapping unless you are certain the existing mapping still matches the evaluator variables.
    • If you change target for an LLM-as-judge rule, usually send both filter and mapping in the same request.
    • For code evaluator rules, omit mapping; Langfuse stores the fixed code runtime mapping automatically.
    • If you change an experiment datasetId filter, call GET /api/public/v2/datasets and use dataset id values from that response.
    interface UpdateEvaluationRuleRequest {
        enabled?: boolean;
        evaluator?: unstable.EvaluationRuleEvaluatorReference;
        filter?: unstable.EvaluationRuleFilter[];
        mapping?: unstable.EvaluationRuleMapping[];
        name?: string;
        sampling?: number;
        target?: unstable.EvaluationRuleTarget;
    }
    Index

    Properties

    enabled?: boolean

    Updated desired enabled state.

    Updated evaluator family.

    Langfuse resolves the provided evaluator family to its latest version before saving the rule. A rule's evaluator type cannot be changed: provide name and scope for an evaluator family of the rule's current type. To use a different evaluator type, create a new rule.

    Updated filter list.

    For target=experiment, column=datasetId expects dataset id values from GET /api/public/v2/datasets, not dataset names.

    Updated LLM-as-judge variable mappings.

    Do not send this field for code evaluator rules. Langfuse stores the fixed code runtime mapping automatically and returns it in the response.

    name?: string

    Updated deployment name.

    sampling?: number

    Updated sampling fraction.

    Updated target object type.