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

# Set a pack's eval set

> Replace the eval set. Owner, stewards or a registry admin.



## OpenAPI

````yaml put /api/registry/context/packs/{artifact_id}/evals
openapi: 3.1.0
info:
  title: Nx1 AI API
  description: |

    AI API for Nx1 Data Platform Management and Automated Data Tasks.

    Authentication is required via PSK in Authorization header.

    Default PSK is | [ask a friend] |
  version: 0.10.2
servers: []
security: []
paths:
  /api/registry/context/packs/{artifact_id}/evals:
    put:
      tags:
        - Context packs
      summary: Set a pack's eval set
      description: Replace the eval set. Owner, stewards or a registry admin.
      operationId: put_eval_set_api_registry_context_packs__artifact_id__evals_put
      parameters:
        - name: artifact_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            description: The context pack's artifact ID.
            title: Artifact Id
          description: The context pack's artifact ID.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/EvalSetRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EvalSetResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Conflict
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Unprocessable Content
      security:
        - OAuth2AuthorizationCodeBearer: []
        - APIKeyHeader: []
components:
  schemas:
    EvalSetRequest:
      properties:
        agent_artifact_id:
          type: string
          format: uuid
          title: Agent Artifact Id
        agent_version:
          type: string
          title: Agent Version
        questions:
          items:
            $ref: '#/components/schemas/EvalQuestion'
          type: array
          maxItems: 200
          minItems: 1
          title: Questions
      type: object
      required:
        - agent_artifact_id
        - agent_version
        - questions
      title: EvalSetRequest
      description: 'A pack''s eval set: questions and the agent that answers them.'
    EvalSetResponse:
      properties:
        agent_artifact_id:
          type: string
          format: uuid
          title: Agent Artifact Id
        agent_version:
          type: string
          title: Agent Version
        questions:
          items:
            $ref: '#/components/schemas/EvalQuestion'
          type: array
          maxItems: 200
          minItems: 1
          title: Questions
        pack_artifact_id:
          type: string
          format: uuid
          title: Pack Artifact Id
        updated_by:
          type: string
          title: Updated By
        updated_at:
          type: string
          format: date-time
          title: Updated At
      type: object
      required:
        - agent_artifact_id
        - agent_version
        - questions
        - pack_artifact_id
        - updated_by
        - updated_at
      title: EvalSetResponse
      description: A stored eval set.
    ErrorResponse:
      properties:
        error:
          type: string
          title: Error
          description: A brief description of the error that occurred.
        code:
          type: integer
          title: Code
          description: The HTTP status code associated with the error.
          default: 500
      type: object
      required:
        - error
      title: ErrorResponse
    EvalQuestion:
      properties:
        id:
          type: string
          maxLength: 64
          minLength: 1
          title: Id
        question:
          type: string
          maxLength: 4000
          minLength: 3
          title: Question
        expected:
          items:
            type: string
          type: array
          maxItems: 20
          title: Expected
          description: Facts the answer must state.
        forbidden:
          items:
            type: string
          type: array
          maxItems: 20
          title: Forbidden
          description: Facts the answer must not state.
      type: object
      required:
        - id
        - question
      title: EvalQuestion
      description: One question and what a good answer contains.
  securitySchemes:
    OAuth2AuthorizationCodeBearer:
      type: oauth2
      flows:
        authorizationCode:
          scopes: {}
          authorizationUrl: >-
            https://sso-rapid.rapid.nx1cloud.com/realms/rapid/protocol/openid-connect/auth
          tokenUrl: >-
            https://sso-rapid.rapid.nx1cloud.com/realms/rapid/protocol/openid-connect/token
    APIKeyHeader:
      type: apiKey
      in: header
      name: Authorization-PSK

````

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