Langfuse JS/TS SDKs
    Preparing search index...

    Interface EvaluationRule

    {
    * id: "erule_123",
    * name: "answer-correctness-live",
    * evaluator: {
    * id: "evaltmpl_123",
    * name: "answer-correctness",
    * type: LangfuseAPI.unstable.EvaluatorType.LlmAsJudge
    * },
    * evaluators: [{
    * evaluator: {
    * id: "evaltmpl_123",
    * name: "answer-correctness",
    * type: LangfuseAPI.unstable.EvaluatorType.LlmAsJudge
    * },
    * mapping: [{
    * variable: "input",
    * source: LangfuseAPI.unstable.PromptVariableMappingSource.Input
    * }, {
    * variable: "output",
    * source: LangfuseAPI.unstable.PromptVariableMappingSource.Output
    * }]
    * }],
    * target: LangfuseAPI.unstable.EvaluationRuleTarget.Observation,
    * enabled: true,
    * status: LangfuseAPI.unstable.EvaluationRuleStatus.Active,
    * pausedReason: null,
    * pausedMessage: null,
    * sampling: 1,
    * filter: [{
    * type: "stringOptions",
    * column: "type",
    * operator: LangfuseAPI.unstable.EvaluationRuleOptionsFilterOperator.AnyOf,
    * value: ["GENERATION"]
    * }],
    * mapping: [{
    * variable: "input",
    * source: LangfuseAPI.unstable.PromptVariableMappingSource.Input
    * }, {
    * variable: "output",
    * source: LangfuseAPI.unstable.PromptVariableMappingSource.Output
    * }],
    * createdAt: "2026-03-30T09:20:00.000Z",
    * updatedAt: "2026-03-30T09:20:00.000Z"
    * }
    interface EvaluationRule {
        createdAt: string;
        enabled: boolean;
        evaluator: null | unstable.EvaluationRuleEvaluator;
        evaluators: unstable.EvaluationRuleEvaluatorAssignment[];
        filter: unstable.EvaluationRuleFilter[];
        id: string;
        mapping: unstable.PromptVariableMappingRead[];
        name: string;
        pausedMessage: null | string;
        pausedReason: null | string;
        sampling: number;
        status: unstable.EvaluationRuleStatus;
        target: unstable.EvaluationRuleTarget;
        updatedAt: string;
    }

    Hierarchy (View Summary)

    Index

    Properties

    createdAt: string

    Timestamp when the evaluation rule was created.

    enabled: boolean

    Desired enabled state configured by the client.

    Deprecated compatibility alias for evaluators[0].evaluator, or null when the rule currently has no evaluator assignments.

    id identifies the evaluator family. The rule automatically uses the latest available version of that evaluator.

    Evaluators attached to this rule in deterministic assignment order. A null mapping inherits the evaluator version's default mapping.

    List of filter conditions used to decide whether a target should be evaluated.

    id: string

    Stable evaluation rule identifier.

    Deprecated compatibility alias containing the effective mapping for evaluators[0].

    name: string

    Human-readable deployment name. This is independent from the evaluator name.

    pausedMessage: null | string

    Human-readable explanation when status=paused, otherwise null.

    pausedReason: null | string

    Machine-readable reason when status=paused, otherwise null.

    sampling: number

    Fraction of matching target objects that should be evaluated.

    Must be greater than 0 and less than or equal to 1.

    • 1 means evaluate every matching target.
    • 0.25 means evaluate approximately 25% of matching targets.

    Effective runtime status after Langfuse applies validation and blocking rules.

    Target object type that should trigger scoring.

    updatedAt: string

    Timestamp when the evaluation rule was last updated.