Skip to main content

Overview

Rather than a task being applied uniformly across all rows, conditional rubrics allow for rows to be pre-filtered on some run_condition. Filtered out rows receive a "skipped" status. They appear as empty in the evaluation results table and are excluded from evaluation dashboard calculations. The following example filters out rows where the subject is not 'math'. conditional-rubric-evaluation-results Run conditions are currently supported via the SDK only for auto evaluations of type guided_decoding.

Format

The run_condition object is a discriminated union on op with the following properties supported:
  • Leaf types: const, var (item locator references)
  • Comparison ops: eq, ne, lt, lte, gt, gte
  • Set ops: in, not_in
  • Logical ops: and, or, not, is_null, is_not_null

Example

Simple run_condition

"run_condition":{
    "op": "eq",
    "left": { "op": "var", "path": "item.subject" },
    "right": { "op": "const", "value": "math" }
},

Nested run_condition

"run_condition": {
  "op": "or",
  "operands": [
    {
      "op": "eq",
      "left":  { "op": "var", "path": "item.Score" },
      "right": { "op": "const", "value": 5 }
    },
    {
      "op": "eq",
      "left":  { "op": "var", "path": "item.Score" },
      "right": { "op": "const", "value": 3 }
    }
  ]
}