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

# Score a draft Classifier (Jev) question on a sample

> Runs the Classifier (Jev) on a question that has not been saved, against a session, one turn of it, or typed values. Persists nothing and consumes no credits. Answers 400 where the deployment does not enable Classifier (Jev) metrics.



## OpenAPI

````yaml https://api.galtea.ai/openapi.json post /metrics/test-draft
openapi: 3.0.0
info:
  version: 1.0.0
  title: Product Management Service API
  description: API documentation for Product Management Service
  contact:
    name: Galtea AI
servers:
  - url: https://api.galtea.ai
security:
  - bearerAuth: []
tags: []
externalDocs:
  description: Galtea Platform Documentation
  url: https://docs.galtea.ai
paths:
  /metrics/test-draft:
    post:
      tags:
        - metrics
      summary: Score a draft Classifier (Jev) question on a sample
      description: >-
        Runs the Classifier (Jev) on a question that has not been saved, against
        a session, one turn of it, or typed values. Persists nothing and
        consumes no credits. Answers 400 where the deployment does not enable
        Classifier (Jev) metrics.
      operationId: testDraftMetric
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TestDraftMetricBody'
      responses:
        '200':
          description: The draft was scored or skipped
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ClassifierDraftTestResult'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          description: Too many requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '502':
          description: The evaluator or TypeSafe could not score the draft
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - bearerAuth: []
components:
  schemas:
    TestDraftMetricBody:
      type: object
      properties:
        classifierQuestion:
          $ref: '#/components/schemas/ClassifierQuestionInput'
        sample:
          type: object
          properties:
            sessionId:
              type: string
              nullable: true
              minLength: 1
            inferenceResultId:
              type: string
              nullable: true
              minLength: 1
            values:
              type: object
              nullable: true
              additionalProperties:
                type: string
                maxLength: 20000
      required:
        - classifierQuestion
        - sample
    ClassifierDraftTestResult:
      type: object
      properties:
        outcome:
          type: string
          enum:
            - scored
            - skipped
        score:
          type: number
          nullable: true
        reason:
          type: string
        confidence:
          type: number
          nullable: true
          minimum: 0
          maximum: 1
        scoreBreakdown:
          type: object
          nullable: true
          properties:
            version:
              type: integer
            model:
              type: string
            type:
              type: string
              enum:
                - yes_no
                - scale
            value:
              type: number
            confidence:
              type: number
              nullable: true
            pYes:
              type: number
              minimum: 0
              maximum: 1
            goodAnswer:
              type: string
              enum:
                - 'yes'
                - 'no'
            probabilities:
              type: object
              additionalProperties:
                type: number
              description: Per level index, the "does not apply" index included.
            levelScores:
              type: array
              items:
                type: number
            doesNotApply:
              type: boolean
              description: Whether the question had a "does not apply" level.
          required:
            - version
            - model
            - type
            - value
            - confidence
      required:
        - outcome
        - score
        - reason
        - confidence
        - scoreBreakdown
    Error:
      type: object
      properties:
        error:
          type: string
          example: Error type
        message:
          type: string
          example: Error message description
    ClassifierQuestionInput:
      type: object
      properties:
        type:
          type: string
          enum:
            - yes_no
            - scale
        instructions:
          type: string
          maxLength: 2000
          description: >-
            The question, in English, naming at least one {{ evaluation_param
            }}.
        goodAnswer:
          type: string
          nullable: true
          enum:
            - 'yes'
            - 'no'
          description: yes_no only, and required there.
        criteria:
          type: object
          nullable: true
          properties:
            'yes':
              type: string
              nullable: true
              maxLength: 1000
            'no':
              type: string
              nullable: true
              maxLength: 1000
          description: 'yes_no only: what yes and no mean.'
        levels:
          type: array
          nullable: true
          items:
            type: object
            properties:
              description:
                type: string
                maxLength: 1000
              score:
                type: number
                nullable: true
                description: >-
                  From 0 to 1. Omit it on every level to space the scores evenly
                  from 0 (worst) to 1 (best).
            required:
              - description
          maxItems: 10
          description: >-
            scale only: the scored levels, worst first, with non-decreasing
            scores.
        doesNotApply:
          type: string
          nullable: true
          maxLength: 1000
          description: >-
            scale only: the text of an extra level that skips the evaluation
            when the classifier picks it.
      required:
        - type
        - instructions
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        API key authorization. Pass your API key in the Authorization header as
        a Bearer token. Both new (`gsk_*`) and legacy (`gsk-`) API keys are
        accepted, e.g. `Authorization: Bearer gsk_...` or `Authorization: Bearer
        gsk-...`.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.