> ## 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.

# Propose Classifier metrics for an LLM judge revision

> Splits the judge prompt of an LLM judge (PARTIAL_PROMPT) revision into one classifier question per condition, plus one question listing them all when every condition always applies. Persists nothing, consumes no credits, and leaves the revision unchanged. Answers 400 where the deployment does not enable Classifier metrics. The id is a revision id. A metric id answers 404.



## OpenAPI

````yaml /openapi.json post /v2/revisions/{id}/classifier-conversion
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:
  /v2/revisions/{id}/classifier-conversion:
    post:
      tags:
        - revisions
      summary: Propose Classifier metrics for an LLM judge revision
      description: >-
        Splits the judge prompt of an LLM judge (PARTIAL_PROMPT) revision into
        one classifier question per condition, plus one question listing them
        all when every condition always applies. Persists nothing, consumes no
        credits, and leaves the revision unchanged. Answers 400 where the
        deployment does not enable Classifier metrics. The id is a revision id.
        A metric id answers 404.
      operationId: proposeRevisionClassifierConversion
      parameters:
        - schema:
            type: string
            minLength: 1
            description: >-
              Revision ID. A metric ID answers 404; read a metric under
              /v2/metrics.
            example: revision_123
          required: true
          description: >-
            Revision ID. A metric ID answers 404; read a metric under
            /v2/metrics.
          name: id
          in: path
      responses:
        '200':
          description: The proposed classifier metrics
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ClassifierConversion'
        '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: Revision 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 metrics generator could not split the judge prompt
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - bearerAuth: []
components:
  schemas:
    ClassifierConversion:
      type: object
      properties:
        proposals:
          type: array
          items:
            $ref: '#/components/schemas/ClassifierConversionProposal'
          description: One classifier metric per condition of the judge prompt.
        merged:
          allOf:
            - $ref: '#/components/schemas/ClassifierConversionMerged'
            - nullable: true
              description: >-
                One classifier metric whose question lists every condition. Null
                when there are fewer than two conditions or one of them does not
                always apply.
        refused:
          type: array
          items:
            $ref: '#/components/schemas/ClassifierConversionRefused'
          description: The parts no classifier question can check.
        specifications:
          type: array
          items:
            $ref: '#/components/schemas/ClassifierConversionSpecification'
          description: >-
            The source metric's specifications that the caller may read: a
            MEMBER gets only those of the products their user groups grant. Send
            their ids with each metric to link it to them.
      required:
        - proposals
        - merged
        - refused
        - specifications
    Error:
      type: object
      properties:
        error:
          type: string
          example: Error type
        message:
          type: string
          example: Error message description
    ClassifierConversionProposal:
      type: object
      properties:
        name:
          type: string
          description: The name to create the metric with, built from the source name.
        classifierQuestion:
          $ref: '#/components/schemas/ClassifierQuestion'
        evaluationParams:
          type: array
          items:
            type: string
          description: Derived from the question's placeholders.
        label:
          type: string
          description: A few words naming the condition.
        text:
          type: string
          description: The condition, copied word for word from the judge prompt.
      required:
        - name
        - classifierQuestion
        - evaluationParams
        - label
        - text
    ClassifierConversionMerged:
      type: object
      properties:
        name:
          type: string
          description: The name to create the metric with, built from the source name.
        classifierQuestion:
          $ref: '#/components/schemas/ClassifierQuestion'
        evaluationParams:
          type: array
          items:
            type: string
          description: Derived from the question's placeholders.
      required:
        - name
        - classifierQuestion
        - evaluationParams
    ClassifierConversionRefused:
      type: object
      properties:
        text:
          type: string
          description: The part of the judge prompt the classifier cannot check.
        reason:
          type: string
        suggestion:
          type: string
          nullable: true
      required:
        - text
        - reason
        - suggestion
    ClassifierConversionSpecification:
      type: object
      properties:
        id:
          type: string
        name:
          type: string
        description:
          type: string
        productId:
          type: string
      required:
        - id
        - name
        - description
        - productId
    ClassifierQuestion:
      type: object
      properties:
        type:
          type: string
          enum:
            - yes_no
            - scale
        instructions:
          type: string
        goodAnswer:
          type: string
          enum:
            - 'yes'
            - 'no'
        criteria:
          type: object
          nullable: true
          properties:
            'yes':
              type: string
              nullable: true
            'no':
              type: string
              nullable: true
          required:
            - 'yes'
            - 'no'
        levels:
          type: array
          items:
            type: object
            properties:
              description:
                type: string
              score:
                type: number
            required:
              - description
              - score
        doesNotApply:
          type: string
          nullable: true
      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.