> ## Documentation Index
> Fetch the complete documentation index at: https://docs.retab.com/llms.txt
> Use this file to discover all available pages before exploring further.

# List Workflow Evals

> List workflow evals.

Requires `workflow_id` and returns its saved evals as a cursor-paginated
list, each with its latest-run summaries and drift status. Optionally
filter to one block with `target_block_id`. Returns 404 if the workflow
does not exist.

List all workflow evals for a workflow. Optionally filter by `target_block_id` to
get only the evals that target a specific block.

Each entry in `data` is a full `WorkflowEval` (target, source, assertion,
schema-drift state, latest run summaries). Use this to populate an Evals page
or to check whether a workflow has any evals before offering to run them.

The response uses the canonical Retab list envelope:
`{ "data": [...], "list_metadata": { "before": null, "after": null } }`.

<RequestExample>
  ```python Python theme={null}
  from retab import Retab

  client = Retab()

  # All evals for a workflow.
  evals = client.workflows.evals.list(
      workflow_id="wf_abc123xyz",
      limit=50,
  )

  # Only evals for one specific block.
  evals_for_block = client.workflows.evals.list(
      workflow_id="wf_abc123xyz",
      target_block_id="block_extract_invoice",
      limit=20,
  )

  print(f"Workflow has {len(evals.data)} evals")
  ```

  ```typescript TypeScript theme={null}
  import { Retab } from "@retab/node";

  const client = new Retab({ apiKey: process.env.RETAB_API_KEY });

  const evals = await client.workflows.evals.list({
    workflowId: "wf_abc123xyz",
    limit: 50,
  });

  const evalsForBlock = await client.workflows.evals.list({
    workflowId: "wf_abc123xyz",
    targetBlockId: "block_extract_invoice",
    limit: 20,
  });

  console.log(`Workflow has ${evals.data.length} evals`);
  ```

  ```go Go theme={null}
  package main

  import (
  	"context"
  	"fmt"
  	"log"

  	retab "github.com/retab-dev/retab/clients/go"
  )

  func ptr[T any](v T) *T { return &v }

  func main() {
  	ctx := context.Background()

  	client, err := retab.NewClient("")
  	if err != nil {
  		log.Fatal(err)
  	}

  	// All evals for a workflow.
  	evals, err := client.Workflows.Evals.List(ctx, &retab.WorkflowEvalsListParams{
  		WorkflowID: "wf_abc123xyz",
  		PaginationParams: retab.PaginationParams{
  			Limit: ptr(50),
  		},
  	})
  	if err != nil {
  		log.Fatal(err)
  	}

  	// Only evals for one specific block.
  	evalsForBlock, err := client.Workflows.Evals.List(ctx, &retab.WorkflowEvalsListParams{
  		WorkflowID:    "wf_abc123xyz",
  		TargetBlockID: ptr("block_extract_invoice"),
  		PaginationParams: retab.PaginationParams{
  			Limit: ptr(20),
  		},
  	})
  	if err != nil {
  		log.Fatal(err)
  	}

  	fmt.Printf("Workflow has %d evals\n", len(evals.Data))
  	_ = evalsForBlock
  }
  ```

  ```ruby Ruby theme={null}
  require 'retab'

  client = Retab::Client.new(api_key: ENV['RETAB_API_KEY'])

  # All evals for a workflow.
  evals = client.workflows.evals.list(
    workflow_id: 'wf_abc123xyz',
    limit: 50,
  )

  # Only evals for one specific block.
  evals_for_block = client.workflows.evals.list(
    workflow_id: 'wf_abc123xyz',
    target_block_id: 'block_extract_invoice',
    limit: 20,
  )

  puts "Workflow has #{evals.data.length} evals"
  ```

  ```rust Rust theme={null}
  use retab::resources::workflow_evals::ListParams;
  use retab::Retab;

  #[tokio::main]
  async fn main() -> Result<(), Box<dyn std::error::Error>> {
      let client = Retab::new(std::env::var("RETAB_API_KEY")?);

      // All evals for a workflow.
      let evals = client
          .workflows()
          .evals()
          .list(ListParams {
              limit: Some(50),
              ..ListParams::new("wf_abc123xyz")
          })
          .await?;

      // Only evals for one specific block.
      let _evals_for_block = client
          .workflows()
          .evals()
          .list(ListParams {
              target_block_id: Some("block_extract_invoice".into()),
              limit: Some(20),
              ..ListParams::new("wf_abc123xyz")
          })
          .await?;

      println!("Workflow has {} evals", evals.data.len());
      Ok(())
  }
  ```

  ```php PHP theme={null}
  <?php
  require 'vendor/autoload.php';

  use Retab\Client;

  $client = new Client(apiKey: getenv('RETAB_API_KEY'));

  $result = $client->workflows()->evals()->list(
      workflowId: 'wf_abc123',
  );
  print_r($result);
  ```

  ```csharp C# theme={null}
  using Retab;
  using RetabClient = Retab.Retab;

  var apiKey = Environment.GetEnvironmentVariable("RETAB_API_KEY")!;
  var client = new RetabClient(apiKey);

  var result = await client.Workflows.Evals.ListAsync(new WorkflowEvalsListOptions());
  Console.WriteLine(result);
  ```

  ```java Java theme={null}
  import com.retab.RetabClient;
  import com.retab.workflowevals.WorkflowEvalsApi;

  public final class Example {
    public static void main(String[] args) throws Exception {
      RetabClient client = new RetabClient(System.getenv("RETAB_API_KEY"));

      var result = new WorkflowEvalsApi(client).list("wf_abc123", null, null, null, 10L, null);
      System.out.println(result);
    }
  }
  ```

  ```curl cURL theme={null}
  # All evals
  curl -X 'GET' \
    'https://api.retab.com/v1/workflows/evals?workflow_id=wf_abc123xyz&limit=50' \
    -H 'accept: application/json' \
    -H 'Authorization: Bearer <your-api-key>'

  # Filtered by target block
  curl -X 'GET' \
    'https://api.retab.com/v1/workflows/evals?workflow_id=wf_abc123xyz&target_block_id=block_extract_invoice&limit=20' \
    -H 'accept: application/json' \
    -H 'Authorization: Bearer <your-api-key>'
  ```
</RequestExample>

<ResponseExample>
  ```json 200 theme={null}
  {
    "data": [
      {
        "id": "wfnodeeval_hsLEQiM61ez9Piv147MWk",
        "workflow_id": "wf_abc123xyz",
        "target": { "type": "block", "block_id": "block_extract_invoice" },
        "source": {
          "type": "run_step",
          "run_id": "wfrun_def456",
          "step_id": "block_extract_invoice"
        },
        "name": "Q1 invoice total",
        "assertion": {
          "id": "assert_xyz",
          "target": { "output_handle_id": "output-json-0", "path": "total" },
          "condition": { "kind": "equals", "expected": 1234.56 },
          "label": null
        },
        "assertion_schema_dep": {
          "schema_path": "total",
          "subtree_hash": "7d79dd764ab6548d",
          "depends_on_root": false
        },
        "assertion_drift_status": null,
        "schema_drift": "none",
        "schema_drift_detail": null,
        "validation_status": "valid",
        "validation_issues": [],
        "latest_run_summary": {
          "run_record_id": "wfnodeevalrun_abc123",
          "status": "completed",
          "outcome": "passed",
          "started_at": "2026-05-01T13:55:00Z",
          "completed_at": "2026-05-01T13:55:18Z",
          "duration_ms": 18221,
          "workflow_draft_fingerprint": "ddd95baadce6045f",
          "block_execution_fingerprint": "0ff93ddc7cefcb42",
          "assertions_passed": 1,
          "assertions_failed": 0,
          "blocked_assertions": 0
        },
        "latest_passing_run_summary": { "...": "as above" },
        "latest_failing_run_summary": null,
        "created_at": "2026-04-08T14:22:26Z",
        "updated_at": "2026-04-08T14:27:52Z"
      }
    ],
    "list_metadata": {
      "before": null,
      "after": null
    }
  }
  ```
</ResponseExample>


## OpenAPI

````yaml GET /v1/workflows/evals
openapi: 3.1.0
info:
  title: FastAPI
  version: 0.1.0
servers:
  - url: https://api.retab.com
security: []
paths:
  /v1/workflows/evals:
    get:
      tags:
        - Workflows
        - Workflow Evals
      summary: List Workflow Evals
      description: |-
        List workflow evals.

        Requires `workflow_id` and returns its saved evals as a cursor-paginated
        list, each with its latest-run summaries and drift status. Optionally
        filter to one block with `target_block_id`. Returns 404 if the workflow
        does not exist.
      operationId: list_workflow_evals
      parameters:
        - in: query
          name: workflow_id
          required: true
          schema:
            type: string
            title: Workflow Id
        - in: query
          name: target_block_id
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Target Block Id
          required: false
        - in: query
          name: before
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Before
          required: false
        - in: query
          name: after
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: After
          required: false
        - in: query
          name: limit
          schema:
            type: integer
            maximum: 100
            minimum: 1
            default: 50
            title: Limit
          required: false
        - in: query
          name: order
          schema:
            enum:
              - asc
              - desc
            type: string
            default: desc
            title: Order
          required: false
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WorkflowEvalList'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - HTTPBearer: []
components:
  schemas:
    WorkflowEvalList:
      description: >-
        A page of `WorkflowEval` resources. `data` holds the items and
        `list_metadata` carries the `before`/`after` cursors; pass `after` to
        fetch the next page.
      properties:
        data:
          items:
            $ref: '#/components/schemas/WorkflowEval'
          type: array
          title: Data
        list_metadata:
          $ref: '#/components/schemas/ListMetadata'
      type: object
      required:
        - data
        - list_metadata
      title: WorkflowEvalList
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
          default: []
      type: object
      title: HTTPValidationError
    WorkflowEval:
      properties:
        id:
          type: string
          title: Id
        workflow_id:
          type: string
          title: Workflow Id
        target:
          $ref: '#/components/schemas/WorkflowEvalBlockTarget'
        source:
          oneOf:
            - $ref: '#/components/schemas/ManualWorkflowEvalSource'
            - $ref: '#/components/schemas/RunStepWorkflowEvalSource'
          title: Source
          discriminator:
            propertyName: type
            mapping:
              manual:
                $ref: '#/components/schemas/ManualWorkflowEvalSource'
              run_step:
                $ref: '#/components/schemas/RunStepWorkflowEvalSource'
        name:
          anyOf:
            - type: string
            - type: 'null'
          title: Name
        assertion:
          anyOf:
            - $ref: '#/components/schemas/AssertionSpec'
            - type: 'null'
        assertion_schema_dep:
          anyOf:
            - $ref: '#/components/schemas/AssertionSchemaDep'
            - type: 'null'
        assertion_drift_status:
          anyOf:
            - type: string
              enum:
                - valid
                - drifted
                - broken
            - type: 'null'
          title: Assertion Drift Status
        schema_drift:
          type: string
          enum:
            - none
            - partial
            - drifted
            - unknown
          title: Schema Drift
          default: unknown
        schema_drift_detail:
          anyOf:
            - type: string
            - type: 'null'
          title: Schema Drift Detail
        freshness:
          $ref: '#/components/schemas/ArtifactFreshness'
        drift:
          $ref: '#/components/schemas/ArtifactDrift'
        validation_status:
          type: string
          title: Validation Status
          default: valid
        validation_issues:
          items: {}
          type: array
          title: Validation Issues
          default: []
        latest_run_summary:
          anyOf:
            - $ref: '#/components/schemas/LatestBlockEvalRunSummary'
            - type: 'null'
        latest_passing_run_summary:
          anyOf:
            - $ref: '#/components/schemas/LatestBlockEvalRunSummary'
            - type: 'null'
        latest_failing_run_summary:
          anyOf:
            - $ref: '#/components/schemas/LatestBlockEvalRunSummary'
            - type: 'null'
        created_at:
          type: string
          format: date-time
          title: Created At
          description: When the workflow eval was created
        updated_at:
          type: string
          format: date-time
          title: Updated At
          description: When the workflow eval was last updated
      type: object
      required:
        - id
        - source
        - target
        - workflow_id
      title: WorkflowEval
      description: >-
        A saved workflow eval: a target block, an input `source`, and the
        `assertion` evaluated against its output.
    ListMetadata:
      properties:
        before:
          anyOf:
            - type: string
            - type: 'null'
          title: Before
        after:
          anyOf:
            - type: string
            - type: 'null'
          title: After
      type: object
      required:
        - after
        - before
      title: ListMetadata
      description: Boundary resource IDs for page navigation.
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
          default: null
        ctx:
          type: object
          title: Context
          default: {}
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
    WorkflowEvalBlockTarget:
      properties:
        type:
          type: string
          const: block
          title: Type
          default: block
        block_id:
          type: string
          title: Block Id
      type: object
      required:
        - block_id
      title: WorkflowEvalBlockTarget
      description: >-
        Public workflow-eval target.


        The storage layer remains block-scoped today, but the API shape names
        the

        tested entity explicitly so workflow-level targets can be added later.
    ManualWorkflowEvalSource:
      properties:
        type:
          type: string
          const: manual
          title: Type
          default: manual
        handle_inputs:
          additionalProperties:
            oneOf:
              - $ref: '#/components/schemas/EvalJsonHandleInput'
              - $ref: '#/components/schemas/EvalFileHandleInput'
            discriminator:
              propertyName: type
              mapping:
                file:
                  $ref: '#/components/schemas/EvalFileHandleInput'
                json:
                  $ref: '#/components/schemas/EvalJsonHandleInput'
          type: object
          title: Handle Inputs
          default: {}
      type: object
      title: ManualWorkflowEvalSource
    RunStepWorkflowEvalSource:
      properties:
        type:
          type: string
          const: run_step
          title: Type
          default: run_step
        run_id:
          type: string
          title: Run Id
        step_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Step Id
      type: object
      required:
        - run_id
      title: RunStepWorkflowEvalSource
    AssertionSpec:
      properties:
        id:
          anyOf:
            - type: string
            - type: 'null'
          title: Id
        target:
          $ref: '#/components/schemas/OutputTarget'
        condition:
          oneOf:
            - $ref: '#/components/schemas/ExistsCondition'
            - $ref: '#/components/schemas/NotExistsCondition'
            - $ref: '#/components/schemas/EqualsCondition'
            - $ref: '#/components/schemas/NotEqualsCondition'
            - $ref: '#/components/schemas/NumberCompareCondition'
            - $ref: '#/components/schemas/ContainsCondition'
            - $ref: '#/components/schemas/ObjectContainsCondition'
            - $ref: '#/components/schemas/ArrayContainsCondition'
            - $ref: '#/components/schemas/MatchesRegexCondition'
            - $ref: '#/components/schemas/JsonSchemaValidCondition'
            - $ref: '#/components/schemas/SimilarityGteCondition'
            - $ref: '#/components/schemas/LlmJudgedAsCondition'
            - $ref: '#/components/schemas/LlmNotJudgedAsCondition'
            - $ref: '#/components/schemas/NotContainsCondition'
            - $ref: '#/components/schemas/LengthCompareCondition'
            - $ref: '#/components/schemas/BetweenCondition'
            - $ref: '#/components/schemas/StartsWithCondition'
            - $ref: '#/components/schemas/EndsWithCondition'
            - $ref: '#/components/schemas/AllItemsMatchCondition'
            - $ref: '#/components/schemas/AnyItemMatchesCondition'
            - $ref: '#/components/schemas/SplitIOUCondition'
          title: Condition
          discriminator:
            propertyName: kind
            mapping:
              all_items_match:
                $ref: '#/components/schemas/AllItemsMatchCondition'
              any_item_matches:
                $ref: '#/components/schemas/AnyItemMatchesCondition'
              array_contains:
                $ref: '#/components/schemas/ArrayContainsCondition'
              between:
                $ref: '#/components/schemas/BetweenCondition'
              contains:
                $ref: '#/components/schemas/ContainsCondition'
              ends_with:
                $ref: '#/components/schemas/EndsWithCondition'
              equals:
                $ref: '#/components/schemas/EqualsCondition'
              exists:
                $ref: '#/components/schemas/ExistsCondition'
              json_schema_valid:
                $ref: '#/components/schemas/JsonSchemaValidCondition'
              length_compare:
                $ref: '#/components/schemas/LengthCompareCondition'
              llm_judged_as:
                $ref: '#/components/schemas/LlmJudgedAsCondition'
              llm_not_judged_as:
                $ref: '#/components/schemas/LlmNotJudgedAsCondition'
              matches_regex:
                $ref: '#/components/schemas/MatchesRegexCondition'
              not_contains:
                $ref: '#/components/schemas/NotContainsCondition'
              not_equals:
                $ref: '#/components/schemas/NotEqualsCondition'
              not_exists:
                $ref: '#/components/schemas/NotExistsCondition'
              number_compare:
                $ref: '#/components/schemas/NumberCompareCondition'
              object_contains:
                $ref: '#/components/schemas/ObjectContainsCondition'
              similarity_gte:
                $ref: '#/components/schemas/SimilarityGteCondition'
              split_iou_gte:
                $ref: '#/components/schemas/SplitIOUCondition'
              starts_with:
                $ref: '#/components/schemas/StartsWithCondition'
        label:
          anyOf:
            - type: string
            - type: 'null'
          title: Label
      type: object
      required:
        - condition
        - target
      title: AssertionSpec
      description: |-
        Block-eval assertion against one declared output handle.

        `target` is the only supported shape: an output handle id and an
        optional relative path inside that handle's payload.
    AssertionSchemaDep:
      properties:
        output_handle_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Output Handle Id
        schema_path:
          type: string
          title: Schema Path
        subtree_hash:
          type: string
          title: Subtree Hash
        depends_on_root:
          type: boolean
          title: Depends On Root
          default: false
      type: object
      required:
        - schema_path
        - subtree_hash
      title: AssertionSchemaDep
      description: Single-rule schema dependency for Level 2 drift detection.
    ArtifactFreshness:
      properties:
        status:
          type: string
          enum:
            - fresh
            - stale
            - unknown
          title: Status
          default: unknown
        reasons:
          items:
            type: string
            enum:
              - validity_changed
              - inputs_changed
              - engine_changed
              - metrics_engine_changed
              - no_baseline
          type: array
          title: Reasons
          default: []
        validity_fingerprint:
          anyOf:
            - type: string
            - type: 'null'
          title: Validity Fingerprint
        input_fingerprint:
          anyOf:
            - type: string
            - type: 'null'
          title: Input Fingerprint
        baseline_run_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Baseline Run Id
      type: object
      title: ArtifactFreshness
    ArtifactDrift:
      properties:
        status:
          type: string
          enum:
            - none
            - drifted
            - broken
            - unknown
          title: Status
          default: unknown
        affected_targets:
          items:
            type: string
          type: array
          title: Affected Targets
          default: []
        detail:
          anyOf:
            - type: string
            - type: 'null'
          title: Detail
      type: object
      title: ArtifactDrift
    LatestBlockEvalRunSummary:
      properties:
        run_record_id:
          type: string
          title: Run Record Id
        status:
          type: string
          enum:
            - pending
            - queued
            - running
            - completed
            - error
            - cancelled
          title: Status
        outcome:
          anyOf:
            - type: string
              enum:
                - passed
                - failed
                - blocked
            - type: 'null'
          title: Outcome
        started_at:
          type: string
          format: date-time
          title: Started At
        completed_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Completed At
        duration_ms:
          anyOf:
            - type: integer
            - type: 'null'
          title: Duration Ms
        workflow_draft_fingerprint:
          anyOf:
            - type: string
            - type: 'null'
          title: Workflow Draft Fingerprint
        block_execution_fingerprint:
          anyOf:
            - type: string
            - type: 'null'
          title: Block Execution Fingerprint
        validity_fingerprint:
          anyOf:
            - type: string
            - type: 'null'
          title: Validity Fingerprint
        handle_inputs_fingerprint:
          anyOf:
            - type: string
            - type: 'null'
          title: Handle Inputs Fingerprint
        assertions_passed:
          type: integer
          title: Assertions Passed
          default: 0
        assertions_failed:
          type: integer
          title: Assertions Failed
          default: 0
        blocked_assertions:
          type: integer
          title: Blocked Assertions
          default: 0
      type: object
      required:
        - run_record_id
        - started_at
        - status
      title: LatestBlockEvalRunSummary
      description: |-
        Summary of the most recent block-eval run.

        Execution status and verdict outcome are exposed as separate fields.
        The summary is written on terminal-state transitions, so in practice
        `status` is one of `completed | error | cancelled` and `outcome` is
        populated when `status == "completed"`.
    EvalJsonHandleInput:
      properties:
        data:
          title: Data
          default: null
        type:
          type: string
          const: json
          title: Type
          default: json
      additionalProperties: false
      type: object
      title: EvalJsonHandleInput
    EvalFileHandleInput:
      properties:
        document:
          $ref: '#/components/schemas/EvalPublicFileRef'
        type:
          type: string
          const: file
          title: Type
          default: file
      additionalProperties: false
      type: object
      required:
        - document
      title: EvalFileHandleInput
    OutputTarget:
      properties:
        output_handle_id:
          type: string
          minLength: 1
          title: Output Handle Id
        path:
          anyOf:
            - type: string
            - type: 'null'
          title: Path
      additionalProperties: false
      type: object
      required:
        - output_handle_id
      title: OutputTarget
      description: Structured block-eval assertion target.
    ExistsCondition:
      properties:
        kind:
          type: string
          const: exists
          title: Kind
          default: exists
      type: object
      title: ExistsCondition
    NotExistsCondition:
      properties:
        kind:
          type: string
          const: not_exists
          title: Kind
          default: not_exists
      type: object
      title: NotExistsCondition
    EqualsCondition:
      properties:
        kind:
          type: string
          const: equals
          title: Kind
          default: equals
        expected:
          title: Expected
      type: object
      required:
        - expected
      title: EqualsCondition
    NotEqualsCondition:
      properties:
        kind:
          type: string
          const: not_equals
          title: Kind
          default: not_equals
        expected:
          title: Expected
      type: object
      required:
        - expected
      title: NotEqualsCondition
    NumberCompareCondition:
      properties:
        kind:
          type: string
          const: number_compare
          title: Kind
          default: number_compare
        op:
          type: string
          enum:
            - gt
            - gte
            - lt
            - lte
            - eq
            - neq
          title: Op
        expected:
          anyOf:
            - type: integer
            - type: number
          title: Expected
      type: object
      required:
        - expected
        - op
      title: NumberCompareCondition
    ContainsCondition:
      properties:
        kind:
          type: string
          const: contains
          title: Kind
          default: contains
        expected:
          title: Expected
      type: object
      required:
        - expected
      title: ContainsCondition
    ObjectContainsCondition:
      properties:
        kind:
          type: string
          const: object_contains
          title: Kind
          default: object_contains
        expected:
          additionalProperties: true
          type: object
          title: Expected
      type: object
      required:
        - expected
      title: ObjectContainsCondition
    ArrayContainsCondition:
      properties:
        kind:
          type: string
          const: array_contains
          title: Kind
          default: array_contains
        expected:
          additionalProperties: true
          type: object
          title: Expected
      type: object
      required:
        - expected
      title: ArrayContainsCondition
    MatchesRegexCondition:
      properties:
        kind:
          type: string
          const: matches_regex
          title: Kind
          default: matches_regex
        pattern:
          type: string
          title: Pattern
      type: object
      required:
        - pattern
      title: MatchesRegexCondition
    JsonSchemaValidCondition:
      properties:
        kind:
          type: string
          const: json_schema_valid
          title: Kind
          default: json_schema_valid
        schema:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Schema
      type: object
      title: JsonSchemaValidCondition
    SimilarityGteCondition:
      properties:
        kind:
          type: string
          const: similarity_gte
          title: Kind
          default: similarity_gte
        reference:
          title: Reference
        threshold:
          type: number
          title: Threshold
        method:
          type: string
          enum:
            - levenshtein
            - embeddings
          title: Method
          default: levenshtein
      type: object
      required:
        - reference
        - threshold
      title: SimilarityGteCondition
    LlmJudgedAsCondition:
      properties:
        kind:
          type: string
          const: llm_judged_as
          title: Kind
          default: llm_judged_as
        rubric:
          type: string
          title: Rubric
        expected_label:
          anyOf:
            - type: string
            - type: 'null'
          title: Expected Label
      type: object
      required:
        - rubric
      title: LlmJudgedAsCondition
    LlmNotJudgedAsCondition:
      properties:
        kind:
          type: string
          const: llm_not_judged_as
          title: Kind
          default: llm_not_judged_as
        rubric:
          type: string
          title: Rubric
        expected_label:
          anyOf:
            - type: string
            - type: 'null'
          title: Expected Label
      type: object
      required:
        - rubric
      title: LlmNotJudgedAsCondition
    NotContainsCondition:
      properties:
        kind:
          type: string
          const: not_contains
          title: Kind
          default: not_contains
        expected:
          title: Expected
      type: object
      required:
        - expected
      title: NotContainsCondition
    LengthCompareCondition:
      properties:
        kind:
          type: string
          const: length_compare
          title: Kind
          default: length_compare
        op:
          type: string
          enum:
            - gt
            - gte
            - lt
            - lte
            - eq
            - neq
          title: Op
        expected:
          type: integer
          title: Expected
      type: object
      required:
        - expected
        - op
      title: LengthCompareCondition
    BetweenCondition:
      properties:
        kind:
          type: string
          const: between
          title: Kind
          default: between
        lower:
          anyOf:
            - type: integer
            - type: number
          title: Lower
        upper:
          anyOf:
            - type: integer
            - type: number
          title: Upper
        inclusive:
          type: boolean
          title: Inclusive
          default: true
      type: object
      required:
        - lower
        - upper
      title: BetweenCondition
    StartsWithCondition:
      properties:
        kind:
          type: string
          const: starts_with
          title: Kind
          default: starts_with
        expected:
          type: string
          title: Expected
      type: object
      required:
        - expected
      title: StartsWithCondition
    EndsWithCondition:
      properties:
        kind:
          type: string
          const: ends_with
          title: Kind
          default: ends_with
        expected:
          type: string
          title: Expected
      type: object
      required:
        - expected
      title: EndsWithCondition
    AllItemsMatchCondition:
      properties:
        kind:
          type: string
          const: all_items_match
          title: Kind
          default: all_items_match
        condition:
          oneOf:
            - $ref: '#/components/schemas/ExistsCondition'
            - $ref: '#/components/schemas/NotExistsCondition'
            - $ref: '#/components/schemas/EqualsCondition'
            - $ref: '#/components/schemas/NotEqualsCondition'
            - $ref: '#/components/schemas/NumberCompareCondition'
            - $ref: '#/components/schemas/ContainsCondition'
            - $ref: '#/components/schemas/ObjectContainsCondition'
            - $ref: '#/components/schemas/ArrayContainsCondition'
            - $ref: '#/components/schemas/MatchesRegexCondition'
            - $ref: '#/components/schemas/JsonSchemaValidCondition'
            - $ref: '#/components/schemas/SimilarityGteCondition'
            - $ref: '#/components/schemas/LlmJudgedAsCondition'
            - $ref: '#/components/schemas/LlmNotJudgedAsCondition'
            - $ref: '#/components/schemas/NotContainsCondition'
            - $ref: '#/components/schemas/LengthCompareCondition'
            - $ref: '#/components/schemas/BetweenCondition'
            - $ref: '#/components/schemas/StartsWithCondition'
            - $ref: '#/components/schemas/EndsWithCondition'
            - $ref: '#/components/schemas/AllItemsMatchCondition'
            - $ref: '#/components/schemas/AnyItemMatchesCondition'
            - $ref: '#/components/schemas/SplitIOUCondition'
          title: Condition
          discriminator:
            propertyName: kind
            mapping:
              all_items_match:
                $ref: '#/components/schemas/AllItemsMatchCondition'
              any_item_matches:
                $ref: '#/components/schemas/AnyItemMatchesCondition'
              array_contains:
                $ref: '#/components/schemas/ArrayContainsCondition'
              between:
                $ref: '#/components/schemas/BetweenCondition'
              contains:
                $ref: '#/components/schemas/ContainsCondition'
              ends_with:
                $ref: '#/components/schemas/EndsWithCondition'
              equals:
                $ref: '#/components/schemas/EqualsCondition'
              exists:
                $ref: '#/components/schemas/ExistsCondition'
              json_schema_valid:
                $ref: '#/components/schemas/JsonSchemaValidCondition'
              length_compare:
                $ref: '#/components/schemas/LengthCompareCondition'
              llm_judged_as:
                $ref: '#/components/schemas/LlmJudgedAsCondition'
              llm_not_judged_as:
                $ref: '#/components/schemas/LlmNotJudgedAsCondition'
              matches_regex:
                $ref: '#/components/schemas/MatchesRegexCondition'
              not_contains:
                $ref: '#/components/schemas/NotContainsCondition'
              not_equals:
                $ref: '#/components/schemas/NotEqualsCondition'
              not_exists:
                $ref: '#/components/schemas/NotExistsCondition'
              number_compare:
                $ref: '#/components/schemas/NumberCompareCondition'
              object_contains:
                $ref: '#/components/schemas/ObjectContainsCondition'
              similarity_gte:
                $ref: '#/components/schemas/SimilarityGteCondition'
              split_iou_gte:
                $ref: '#/components/schemas/SplitIOUCondition'
              starts_with:
                $ref: '#/components/schemas/StartsWithCondition'
      type: object
      required:
        - condition
      title: AllItemsMatchCondition
    AnyItemMatchesCondition:
      properties:
        kind:
          type: string
          const: any_item_matches
          title: Kind
          default: any_item_matches
        condition:
          oneOf:
            - $ref: '#/components/schemas/ExistsCondition'
            - $ref: '#/components/schemas/NotExistsCondition'
            - $ref: '#/components/schemas/EqualsCondition'
            - $ref: '#/components/schemas/NotEqualsCondition'
            - $ref: '#/components/schemas/NumberCompareCondition'
            - $ref: '#/components/schemas/ContainsCondition'
            - $ref: '#/components/schemas/ObjectContainsCondition'
            - $ref: '#/components/schemas/ArrayContainsCondition'
            - $ref: '#/components/schemas/MatchesRegexCondition'
            - $ref: '#/components/schemas/JsonSchemaValidCondition'
            - $ref: '#/components/schemas/SimilarityGteCondition'
            - $ref: '#/components/schemas/LlmJudgedAsCondition'
            - $ref: '#/components/schemas/LlmNotJudgedAsCondition'
            - $ref: '#/components/schemas/NotContainsCondition'
            - $ref: '#/components/schemas/LengthCompareCondition'
            - $ref: '#/components/schemas/BetweenCondition'
            - $ref: '#/components/schemas/StartsWithCondition'
            - $ref: '#/components/schemas/EndsWithCondition'
            - $ref: '#/components/schemas/AllItemsMatchCondition'
            - $ref: '#/components/schemas/AnyItemMatchesCondition'
            - $ref: '#/components/schemas/SplitIOUCondition'
          title: Condition
          discriminator:
            propertyName: kind
            mapping:
              all_items_match:
                $ref: '#/components/schemas/AllItemsMatchCondition'
              any_item_matches:
                $ref: '#/components/schemas/AnyItemMatchesCondition'
              array_contains:
                $ref: '#/components/schemas/ArrayContainsCondition'
              between:
                $ref: '#/components/schemas/BetweenCondition'
              contains:
                $ref: '#/components/schemas/ContainsCondition'
              ends_with:
                $ref: '#/components/schemas/EndsWithCondition'
              equals:
                $ref: '#/components/schemas/EqualsCondition'
              exists:
                $ref: '#/components/schemas/ExistsCondition'
              json_schema_valid:
                $ref: '#/components/schemas/JsonSchemaValidCondition'
              length_compare:
                $ref: '#/components/schemas/LengthCompareCondition'
              llm_judged_as:
                $ref: '#/components/schemas/LlmJudgedAsCondition'
              llm_not_judged_as:
                $ref: '#/components/schemas/LlmNotJudgedAsCondition'
              matches_regex:
                $ref: '#/components/schemas/MatchesRegexCondition'
              not_contains:
                $ref: '#/components/schemas/NotContainsCondition'
              not_equals:
                $ref: '#/components/schemas/NotEqualsCondition'
              not_exists:
                $ref: '#/components/schemas/NotExistsCondition'
              number_compare:
                $ref: '#/components/schemas/NumberCompareCondition'
              object_contains:
                $ref: '#/components/schemas/ObjectContainsCondition'
              similarity_gte:
                $ref: '#/components/schemas/SimilarityGteCondition'
              split_iou_gte:
                $ref: '#/components/schemas/SplitIOUCondition'
              starts_with:
                $ref: '#/components/schemas/StartsWithCondition'
      type: object
      required:
        - condition
      title: AnyItemMatchesCondition
    SplitIOUCondition:
      properties:
        kind:
          type: string
          const: split_iou_gte
          title: Kind
          default: split_iou_gte
        expected:
          additionalProperties: true
          type: object
          title: Expected
        threshold:
          type: number
          title: Threshold
          default: 1
      type: object
      required:
        - expected
      title: SplitIOUCondition
      description: |-
        Intersection-over-Union for split page assignments.

        `expected` uses the split payload shape:
        `{"splits": [{"name", "pages"}]}`
    EvalPublicFileRef:
      properties:
        id:
          type: string
          title: Id
          description: ID of the file
        filename:
          type: string
          title: Filename
          description: Filename of the file
        mime_type:
          type: string
          title: Mime Type
          description: MIME type of the file
      type: object
      required:
        - filename
        - id
        - mime_type
      title: EvalPublicFileRef
      description: Public/shared file reference used across SDK and customer-facing APIs.
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer

````