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

# Run evaluation

> Evaluate a retriever's quality using a ground truth dataset. Returns immediately with a task ID - evaluation runs asynchronously.



## OpenAPI

````yaml post /v1/retrievers/{retriever_id}/evaluations
openapi: 3.1.0
info:
  title: Mixpeek API
  description: >-
    This is the Mixpeek API, providing access to various endpoints for data
    processing and retrieval.
  termsOfService: https://mixpeek.com/terms
  contact:
    name: Mixpeek Support
    url: https://mixpeek.com/contact
    email: info@mixpeek.com
  version: '0.82'
servers:
  - url: https://api.mixpeek.com
    description: Production
security: []
paths:
  /v1/retrievers/{retriever_id}/evaluations:
    post:
      tags:
        - Retriever Evaluations
      summary: Run evaluation
      description: >-
        Evaluate a retriever's quality using a ground truth dataset. Returns
        immediately with a task ID - evaluation runs asynchronously.
      operationId: start_evaluation_v1_retrievers__retriever_id__evaluations_post
      parameters:
        - name: retriever_id
          in: path
          required: true
          schema:
            type: string
            title: Retriever Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/StartEvaluationRequest'
      responses:
        '202':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StartEvaluationResponse'
        '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'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
components:
  schemas:
    StartEvaluationRequest:
      properties:
        dataset_name:
          type: string
          minLength: 1
          title: Dataset Name
          description: Name of the evaluation dataset to use
        evaluation_config:
          anyOf:
            - $ref: '#/components/schemas/EvaluationConfig'
            - type: 'null'
          description: Optional evaluation configuration (uses defaults if not provided)
      type: object
      required:
        - dataset_name
      title: StartEvaluationRequest
      description: Request to start an evaluation.
    StartEvaluationResponse:
      properties:
        task_id:
          type: string
          title: Task Id
          description: Task ID for tracking progress
        evaluation_id:
          type: string
          title: Evaluation Id
          description: Evaluation ID
        task_type:
          type: string
          title: Task Type
          description: Task type
          default: retriever.evaluation
        status:
          type: string
          title: Status
          description: Initial status
          default: pending
        created_at:
          type: string
          title: Created At
          description: Creation timestamp
      type: object
      required:
        - task_id
        - evaluation_id
        - created_at
      title: StartEvaluationResponse
      description: Response when starting an evaluation.
    ErrorResponse:
      properties:
        success:
          type: boolean
          title: Success
          description: Always false for error responses
          default: false
        status:
          type: integer
          title: Status
          description: HTTP status code for this error
        error:
          $ref: '#/components/schemas/ErrorDetail'
          description: Error details payload
      type: object
      required:
        - status
        - error
      title: ErrorResponse
      description: Error response model.
      examples:
        - error:
            details:
              id: ns_123
              resource: namespace
            message: Namespace not found
            type: NotFoundError
          status: 404
          success: false
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    EvaluationConfig:
      properties:
        k_values:
          anyOf:
            - items:
                type: integer
              type: array
            - type: 'null'
          title: K Values
          description: K values for Precision@K, Recall@K, NDCG@K, etc.
          default:
            - 1
            - 5
            - 10
            - 20
        metrics:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Metrics
          description: >-
            List of metrics to calculate. Available: precision, recall, f1, f2,
            map, ndcg, mrr. f2 is the recall-weighted F-beta (beta=2) — useful
            when missing a relevant doc costs more than a false positive.
          default:
            - precision
            - recall
            - f1
            - map
            - ndcg
            - mrr
      type: object
      title: EvaluationConfig
      description: Configuration for an evaluation run.
    ErrorDetail:
      properties:
        message:
          type: string
          title: Message
          description: Human-readable error message
        type:
          type: string
          title: Type
          description: Stable error type identifier (machine-readable)
        code:
          anyOf:
            - type: string
            - type: 'null'
          title: Code
          description: >-
            Fine-grained error code for programmatic handling (e.g.,
            namespace_name_taken, feature_extractor_not_found). Present only
            when consumers may need to branch on a specific error condition.
        details:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Details
          description: >-
            Optional structured details to help debugging (validation errors,
            IDs, etc.)
      type: object
      required:
        - message
        - type
      title: ErrorDetail
      description: Error detail model.
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError

````