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

# List tests

> Retrieves a paginated list of tests with optional filtering.



## OpenAPI

````yaml https://app.stainless.com/api/spec/documented/avido/openapi.documented.yml get /v0/tests
openapi: 3.1.1
info:
  title: Avido API
  description: >-
    Avido's API for LLM usage events, tool calls, trace management, webhook
    validation, and more. See each endpoint's request/response schema for
    details.
  version: 0.1.0
  contact:
    name: Avido Support
    email: support@avidoai.com
    url: https://avidoai.com/support
servers:
  - url: https://api.avidoai.com
    description: Production API
security:
  - ApiKey: []
    ApplicationId: []
paths:
  /v0/tests:
    get:
      tags:
        - Evals
      summary: List tests
      description: Retrieves a paginated list of tests with optional filtering.
      operationId: listTests
      parameters:
        - in: query
          name: skip
          schema:
            description: Number of items to skip before starting to collect the result set.
            example: 0
            default: 0
            type: integer
            minimum: 0
            maximum: 9007199254740991
          description: Number of items to skip before starting to collect the result set.
        - in: query
          name: limit
          schema:
            description: Number of items to include in the result set.
            example: 25
            type: integer
            minimum: 1
            maximum: 100
          description: Number of items to include in the result set.
        - in: query
          name: orderBy
          schema:
            description: Field to order the result set by.
            example: createdAt
            default: createdAt
            type: string
            enum:
              - createdAt
              - modifiedAt
              - status
              - id
          description: Field to order the result set by.
        - in: query
          name: orderDir
          schema:
            description: Order direction.
            example: desc
            default: desc
            type: string
            enum:
              - asc
              - desc
          description: Order direction.
        - in: query
          name: status
          schema:
            description: Filter by test status (e.g. COMPLETED, FAILED)
            example:
              - COMPLETED
              - FAILED
            type: array
            items:
              type: string
              enum:
                - PENDING
                - IN_PROGRESS
                - COMPLETED
                - FAILED
              description: Status of the evaluation/test
              example: COMPLETED
          description: Filter by test status (e.g. COMPLETED, FAILED)
        - in: query
          name: startDate
          schema:
            description: Filter eval runs after this date (inclusive).
            example: '2024-01-01T00:00:00.000Z'
            type: string
            format: date-time
            pattern: >-
              ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
          description: Filter eval runs after this date (inclusive).
        - in: query
          name: endDate
          schema:
            description: Filter eval runs before this date (inclusive).
            example: '2024-12-31T23:59:59.999Z'
            type: string
            format: date-time
            pattern: >-
              ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
          description: Filter eval runs before this date (inclusive).
        - in: query
          name: passRateStatuses
          schema:
            description: >-
              Filter by pass rate status badges (success: >75%, warning: 51-75%,
              error: ≤50%)
            example:
              - success
              - warning
            type: array
            items:
              type: string
              enum:
                - success
                - warning
                - error
          description: >-
            Filter by pass rate status badges (success: >75%, warning: 51-75%,
            error: ≤50%)
        - in: query
          name: evalDefinitionId
          schema:
            description: Filter tests by eval definition ID
            example: 123e4567-e89b-12d3-a456-426614174000
            type: array
            items:
              type: string
              format: uuid
              pattern: >-
                ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
          description: Filter tests by eval definition ID
        - in: query
          name: experimentVariantId
          schema:
            description: Filter tests by experiment variant ID
            example: 123e4567-e89b-12d3-a456-426614174000
            type: array
            items:
              type: string
              format: uuid
              pattern: >-
                ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
          description: Filter tests by experiment variant ID
        - in: query
          name: runType
          schema:
            description: Filter tests by run type (MANUAL, SCHEDULED, EXPERIMENT)
            example:
              - MANUAL
              - SCHEDULED
            type: array
            items:
              $ref: '#/components/schemas/RunType'
          description: Filter tests by run type (MANUAL, SCHEDULED, EXPERIMENT)
        - in: query
          name: taskId
          schema:
            description: Filter tests by task ID
            example:
              - 123e4567-e89b-12d3-a456-426614174000
            type: array
            items:
              type: string
              format: uuid
              pattern: >-
                ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
          description: Filter tests by task ID
        - in: query
          name: tagId
          schema:
            description: >-
              Filter tests by the associated task's tag IDs. Use '__none__' to
              filter for tests with untagged tasks.
            example:
              - 123e4567-e89b-12d3-a456-426614174000
            maxItems: 100
            type: array
            items:
              type: string
          description: >-
            Filter tests by the associated task's tag IDs. Use '__none__' to
            filter for tests with untagged tasks.
      responses:
        '200':
          description: Successfully retrieved evaluations
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaginatedTestResponse'
        '400':
          description: bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: invalid input
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationErrorResponse'
        '500':
          description: internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      x-codeSamples:
        - lang: JavaScript
          source: |-
            import Avido from 'avido';

            const client = new Avido({
              apiKey: process.env['AVIDO_API_KEY'], // This is the default and can be omitted
              applicationID: process.env['AVIDO_APPLICATION_ID'], // This is the default and can be omitted
            });

            // Automatically fetches more pages as needed.
            for await (const testListResponse of client.tests.list()) {
              console.log(testListResponse.id);
            }
        - lang: Python
          source: |-
            import os
            from avido import Avido

            client = Avido(
                api_key=os.environ.get("AVIDO_API_KEY"),  # This is the default and can be omitted
                application_id=os.environ.get("AVIDO_APPLICATION_ID"),  # This is the default and can be omitted
            )
            page = client.tests.list()
            page = page.data[0]
            print(page.id)
components:
  schemas:
    RunType:
      type: string
      enum:
        - MANUAL
        - SCHEDULED
        - EXPERIMENT
        - MONITORING
    PaginatedTestResponse:
      type: object
      properties:
        data:
          type: array
          items:
            type: object
            properties:
              id:
                type: string
                format: uuid
                pattern: >-
                  ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
                description: Unique identifier of the run
                example: 123e4567-e89b-12d3-a456-426614174000
              applicationId:
                type: string
                description: The ID of the application this test belongs to
              createdAt:
                description: When the test was created
                example: '2024-01-05T12:34:56.789Z'
                type: string
                format: date-time
                pattern: >-
                  ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
              modifiedAt:
                description: When the test was last modified
                example: '2024-01-05T12:34:56.789Z'
                type: string
                format: date-time
                pattern: >-
                  ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
              status:
                type: string
                enum:
                  - PENDING
                  - IN_PROGRESS
                  - COMPLETED
                  - FAILED
                description: Status of the evaluation/test
                example: COMPLETED
              evals:
                type: array
                items:
                  $ref: '#/components/schemas/EvalOutput'
                description: Array of evaluations in this run
              taskId:
                type: string
                format: uuid
                pattern: >-
                  ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
                description: The unique identifier of the task
                example: 123e4567-e89b-12d3-a456-426614174000
              runId:
                type: string
                format: uuid
                pattern: >-
                  ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
                description: The unique identifier of the run
                example: 123e4567-e89b-12d3-a456-426614174000
              traceId:
                anyOf:
                  - type: string
                    format: uuid
                    pattern: >-
                      ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
                  - type: 'null'
                description: >-
                  The unique identifier of the trace produced by this test. Null
                  while the test is pending or if the trace has not been
                  recorded yet.
                example: 123e4567-e89b-12d3-a456-426614174000
              result:
                $ref: '#/components/schemas/TestResultOutput'
                description: Aggregated test result with pass/fail statistics
              task:
                type: object
                properties:
                  id:
                    type: string
                    format: uuid
                    pattern: >-
                      ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
                    description: The unique identifier of the task
                    example: 123e4567-e89b-12d3-a456-426614174000
                  title:
                    type: string
                    description: The title of the task
                    example: Credit Card Block
                  topicId:
                    description: The ID of the topic this task belongs to
                    example: 789e4567-e89b-12d3-a456-426614174000
                    type: string
                    format: uuid
                    pattern: >-
                      ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
                required:
                  - id
                  - title
                additionalProperties: false
              runType:
                $ref: '#/components/schemas/RunType'
                description: The type of run this test belongs to
            required:
              - id
              - applicationId
              - createdAt
              - modifiedAt
              - status
              - evals
              - taskId
              - runId
              - traceId
              - task
              - runType
            additionalProperties: false
        pagination:
          type: object
          properties:
            skip:
              type: integer
              minimum: 0
              maximum: 9007199254740991
              description: Number of items skipped.
              example: 0
            limit:
              type: integer
              minimum: 1
              maximum: 9007199254740991
              description: Number of items per page.
              example: 25
            total:
              type: integer
              minimum: 0
              maximum: 9007199254740991
              description: Total number of items available.
              example: 100
            totalPages:
              type: integer
              minimum: 0
              maximum: 9007199254740991
              description: Total number of pages available.
              example: 4
            totalCount:
              description: >-
                Total number of items without filters applied. Used to
                distinguish between truly empty results and empty filtered
                results.
              example: 100
              type: integer
              minimum: 0
              maximum: 9007199254740991
          required:
            - skip
            - limit
            - total
            - totalPages
          additionalProperties: false
          title: PaginationResponse
          description: Pagination metadata returned in a paginated response.
      required:
        - data
        - pagination
      additionalProperties: false
      title: Paginated Tests
      description: Paginated response containing tests
    ErrorResponse:
      type: object
      properties:
        message:
          type: string
          description: A human-readable error message explaining the error.
          example: Resource not found
      required:
        - message
      additionalProperties: false
      title: ErrorResponse
      description: Standard error format for failed API operations.
    ValidationErrorResponse:
      type: object
      properties:
        message:
          type: string
          description: A human-readable error message indicating what went wrong.
          example: Invalid request data
        issues:
          type: array
          items:
            type: object
            properties:
              code:
                type: string
              message:
                type: string
              path:
                type: array
                items:
                  type: string
            required:
              - code
              - message
              - path
            additionalProperties: false
          description: Array of detailed validation error objects.
          example:
            - code: invalid_string
              message: Invalid UUID
              path:
                - id
      required:
        - message
        - issues
      additionalProperties: false
      title: ValidationErrorResponse
      description: Details about validation errors in incoming requests.
    EvalOutput:
      type: object
      properties:
        id:
          type: string
          format: uuid
          pattern: >-
            ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
          description: Unique identifier of the evaluation
          example: 123e4567-e89b-12d3-a456-426614174000
        orgId:
          type: string
          description: Organization ID that owns this evaluation
          example: org_123456
        createdAt:
          description: When the evaluation was created
          example: '2024-01-05T12:34:56.789Z'
          type: string
          format: date-time
          pattern: >-
            ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
        modifiedAt:
          description: When the evaluation was last modified
          example: '2024-01-05T12:34:56.789Z'
          type: string
          format: date-time
          pattern: >-
            ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
        status:
          type: string
          enum:
            - PENDING
            - IN_PROGRESS
            - COMPLETED
            - FAILED
            - SKIPPED
          description: Status of the evaluation
          example: COMPLETED
        results:
          description: Results of the evaluation (structure depends on eval type).
          anyOf:
            - type: object
              properties:
                coherence:
                  type: number
                  minimum: 1
                  maximum: 5
                engagingness:
                  type: number
                  minimum: 1
                  maximum: 5
                naturalness:
                  type: number
                  minimum: 1
                  maximum: 5
                relevance:
                  type: number
                  minimum: 1
                  maximum: 5
                clarity:
                  type: number
                  minimum: 1
                  maximum: 5
                analysis:
                  type: string
              required:
                - coherence
                - engagingness
                - naturalness
                - relevance
                - clarity
                - analysis
              additionalProperties: false
            - type: object
              properties:
                score:
                  type: number
                  minimum: 1
                  maximum: 5
                  description: The score of the response based on the style guide from 1-5
                analysis:
                  type: string
                  description: >-
                    A brief explanation for your rating, referring to specific
                    aspects of the response and the query. Make sure that the
                    explanation is formatted as markdown, and that it is easy to
                    read and understand.
              required:
                - score
                - analysis
              additionalProperties: false
            - type: object
              properties:
                ContextRelevancy:
                  type: object
                  properties:
                    score:
                      type: number
                    error:
                      type: string
                    metadata:
                      type: object
                      properties:
                        relevantSentences:
                          type: array
                          items:
                            type: object
                            properties:
                              sentence:
                                type: string
                              reasons:
                                type: array
                                items:
                                  type: string
                            required:
                              - sentence
                              - reasons
                            additionalProperties: false
                      required:
                        - relevantSentences
                      additionalProperties: false
                  required:
                    - score
                  additionalProperties: false
                ContextPrecision:
                  type: object
                  properties:
                    score:
                      type: number
                    error:
                      type: string
                    metadata:
                      type: object
                      properties:
                        verdict:
                          type: integer
                          minimum: -9007199254740991
                          maximum: 9007199254740991
                        reason:
                          type: string
                      required:
                        - verdict
                        - reason
                      additionalProperties: false
                  required:
                    - score
                  additionalProperties: false
                Faithfulness:
                  type: object
                  properties:
                    score:
                      type: number
                    error:
                      type: string
                    metadata:
                      type: object
                      properties:
                        statements:
                          type: array
                          items:
                            type: string
                        faithfulness:
                          type: array
                          items:
                            type: object
                            properties:
                              statement:
                                type: string
                              reason:
                                type: string
                              verdict:
                                type: integer
                                minimum: -9007199254740991
                                maximum: 9007199254740991
                              classification:
                                description: >-
                                  Classification of the hallucination type (only
                                  present when verdict is 0)
                                type: string
                                enum:
                                  - UNSUPPORTED_CLAIM
                                  - CONTRADICTION
                                  - PARTIAL_HALLUCINATION
                                  - SCOPE_DRIFT
                            required:
                              - statement
                              - reason
                              - verdict
                            additionalProperties: false
                      required:
                        - statements
                        - faithfulness
                      additionalProperties: false
                  required:
                    - score
                  additionalProperties: false
                AnswerRelevancy:
                  type: object
                  properties:
                    score:
                      type: number
                    error:
                      type: string
                    metadata:
                      type: object
                      properties:
                        questions:
                          type: array
                          items:
                            type: object
                            properties:
                              question:
                                type: string
                            required:
                              - question
                            additionalProperties: false
                        similarity:
                          type: array
                          items:
                            type: object
                            properties:
                              question:
                                type: string
                              score:
                                type: number
                            required:
                              - question
                              - score
                            additionalProperties: false
                      required:
                        - questions
                        - similarity
                      additionalProperties: false
                  required:
                    - score
                  additionalProperties: false
              required:
                - ContextRelevancy
                - ContextPrecision
                - Faithfulness
                - AnswerRelevancy
              additionalProperties: false
            - type: object
              properties:
                score:
                  type: integer
                  minimum: -9007199254740991
                  maximum: 9007199254740991
                error:
                  type: string
                metadata:
                  type: object
                  properties:
                    rationale:
                      type: string
                    choice:
                      type: string
                      enum:
                        - 'Y'
                        - 'N'
                  required:
                    - rationale
                  additionalProperties: false
              required:
                - score
              additionalProperties: false
            - type: object
              properties:
                score:
                  type: number
                reason:
                  type: string
                expected:
                  type: string
                got:
                  type: string
                expectedList:
                  type: array
                  items:
                    type: string
                gotList:
                  type: array
                  items:
                    type: string
                matchMode:
                  type: string
                  enum:
                    - exact_unordered
                    - contains
                scoreMetric:
                  type: string
                  enum:
                    - f1
                    - precision
                    - recall
                precision:
                  type: number
                recall:
                  type: number
                f1:
                  type: number
                tp:
                  type: number
                missing:
                  type: array
                  items:
                    type: object
                    properties:
                      value:
                        type: string
                      need:
                        type: number
                      have:
                        type: number
                    required:
                      - value
                      - need
                      - have
                    additionalProperties: false
              required:
                - score
                - reason
              additionalProperties: false
        definition:
          $ref: '#/components/schemas/EvalDefinitionOutput'
        score:
          description: Overall score of the evaluation
          example: 0.9
          type: number
        passed:
          description: Whether the evaluation passed
          example: true
          type: boolean
        message:
          description: Message explaining why the eval was skipped or failed
          type: string
      required:
        - id
        - orgId
        - createdAt
        - modifiedAt
        - status
        - definition
      additionalProperties: false
      title: Eval
      description: Complete evaluation information
    TestResultOutput:
      type: object
      properties:
        passed:
          type: integer
          minimum: 0
          maximum: 9007199254740991
        failed:
          type: integer
          minimum: 0
          maximum: 9007199254740991
        total:
          type: integer
          minimum: 0
          maximum: 9007199254740991
        passRate:
          type: number
          minimum: 0
          maximum: 100
        averageScore:
          type: number
          minimum: 0
          maximum: 1
      required:
        - passed
        - failed
        - total
        - passRate
        - averageScore
      additionalProperties: false
    EvalDefinitionOutput:
      type: object
      properties:
        id:
          type: string
          format: uuid
          pattern: >-
            ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
        createdAt:
          description: When the eval definition was created
          example: '2024-01-05T12:34:56.789Z'
          type: string
          format: date-time
          pattern: >-
            ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
        modifiedAt:
          description: When the eval definition was last modified
          example: '2024-01-05T12:34:56.789Z'
          type: string
          format: date-time
          pattern: >-
            ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
        type:
          $ref: '#/components/schemas/EvalType'
        name:
          type: string
        globalConfig:
          anyOf:
            - type: object
              properties:
                criterion:
                  type: string
                  minLength: 1
                  description: >-
                    The criterion describes what our evaluation LLM must look
                    for in the response. Remember that the answer to the
                    criterion must be as a pass/fail.
              required:
                - criterion
              additionalProperties: false
            - oneOf:
                - $ref: '#/components/schemas/OutputMatchStringConfigOutput'
                - $ref: '#/components/schemas/OutputMatchListConfigOutput'
              type: object
              discriminator:
                propertyName: type
                mapping:
                  string:
                    $ref: '#/components/schemas/OutputMatchStringConfigOutput'
                  list:
                    $ref: '#/components/schemas/OutputMatchListConfigOutput'
        styleGuideId:
          anyOf:
            - type: string
              format: uuid
              pattern: >-
                ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
            - type: 'null'
        application:
          anyOf:
            - $ref: '#/components/schemas/ApplicationOutput'
            - type: 'null'
        topics:
          description: Topic IDs this eval definition is linked to (for topic-scoped evals)
          example:
            - 456e4567-e89b-12d3-a456-426614174000
          type: array
          items:
            type: string
            format: uuid
            pattern: >-
              ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
      required:
        - id
        - createdAt
        - modifiedAt
        - type
        - name
      additionalProperties: false
    EvalType:
      type: string
      enum:
        - NATURALNESS
        - STYLE
        - RECALL
        - CUSTOM
        - OUTPUT_MATCH
    OutputMatchStringConfigOutput:
      type: object
      properties:
        type:
          type: string
          const: string
        extract:
          $ref: '#/components/schemas/OutputMatchExtractConfigOutput'
      required:
        - type
      additionalProperties: false
    OutputMatchListConfigOutput:
      type: object
      properties:
        type:
          type: string
          const: list
        matchMode:
          type: string
          enum:
            - exact_unordered
            - contains
        scoreMetric:
          type: string
          enum:
            - f1
            - precision
            - recall
        passThreshold:
          type: number
          minimum: 0
          maximum: 1
        extract:
          $ref: '#/components/schemas/OutputMatchExtractConfigOutput'
      required:
        - type
        - matchMode
      additionalProperties: false
    ApplicationOutput:
      type: object
      properties:
        id:
          type: string
          format: uuid
          pattern: >-
            ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
          description: Unique identifier of the application
          example: 123e4567-e89b-12d3-a456-426614174000
        orgId:
          type: string
          description: Organization ID that owns this application
          example: org_123456
        title:
          type: string
          minLength: 1
          description: Title of the application
          example: Customer Support Bot
        slug:
          type: string
          minLength: 1
          description: URL-friendly slug for the application
          example: customer-support-bot
        description:
          type: string
          description: Description of the application
          example: AI assistant for customer support inquiries
        context:
          type: string
          description: Context/instructions for the application
          example: You are a helpful customer support assistant...
        language:
          default: en
          description: Language of the application.
          example: en
          type: string
          enum:
            - da
            - de
            - en
            - es
            - fr
            - it
            - nl
            - pt
            - sv
        type:
          type: string
          enum:
            - CHATBOT
            - AGENT
          description: Type of the application. Valid values are CHATBOT or AGENT.
          example: CHATBOT
        environment:
          default: DEV
          description: Environment of the application. Defaults to DEV.
          example: DEV
          type: string
          enum:
            - DEV
            - PROD
        humanAnnotationEnabled:
          type: boolean
          description: Whether human annotation is enabled for this application
          example: false
        createdAt:
          description: When the application was created
          example: '2024-01-05T12:34:56.789Z'
          type: string
          format: date-time
          pattern: >-
            ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
        modifiedAt:
          description: When the application was last modified
          example: '2024-01-05T12:34:56.789Z'
          type: string
          format: date-time
          pattern: >-
            ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
      required:
        - id
        - orgId
        - title
        - slug
        - description
        - context
        - language
        - type
        - environment
        - humanAnnotationEnabled
        - createdAt
        - modifiedAt
      additionalProperties: false
      title: Application
      description: Application configuration and metadata
    OutputMatchExtractConfigOutput:
      type: object
      properties:
        pattern:
          type: string
          minLength: 1
        flags:
          type: string
          pattern: ^[gimsuy]*$
        group:
          anyOf:
            - type: integer
              minimum: 0
              maximum: 9007199254740991
            - minItems: 1
              type: array
              items:
                type: integer
                minimum: 0
                maximum: 9007199254740991
      required:
        - pattern
        - flags
        - group
      additionalProperties: false
  securitySchemes:
    ApiKey:
      type: apiKey
      in: header
      name: x-api-key
      description: Your unique Avido API key
    ApplicationId:
      type: apiKey
      in: header
      name: x-application-id
      description: Your unique Avido Application ID

````