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

# Compare experiments

> Compare two or more runs of this dataset item by item: for every item, the input, the ground truth, and per run the answer and its scores (per scorer id). Runs of two agent versions, or of the same version before and after a prompt change, read side by side. `baselineId` names the run the others are compared against (default: the first id).



## OpenAPI

````yaml /api-reference/openapi.json post /v1/datasets/{id}/compare
openapi: 3.1.0
info:
  title: Sidenet API
  version: 1.0.0
  description: >-
    Sidenet HTTP endpoints exposed by the Sidenet Studio. All routes require an
    api key that can be generated through the studio in studio.sidenet.ai.
servers:
  - url: https://api.sidenet.ai
security:
  - bearerAuth: []
paths:
  /v1/datasets/{id}/compare:
    post:
      tags:
        - Experiments
      summary: Compare experiments
      description: >-
        Compare two or more runs of this dataset item by item: for every item,
        the input, the ground truth, and per run the answer and its scores (per
        scorer id). Runs of two agent versions, or of the same version before
        and after a prompt change, read side by side. `baselineId` names the run
        the others are compared against (default: the first id).
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
            example: ds_orders_v3
          description: Dataset id.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - experimentIds
              properties:
                experimentIds:
                  type: array
                  minItems: 2
                  maxItems: 10
                  items:
                    type: string
                  description: The runs to compare, all of this dataset.
                baselineId:
                  type: string
                  description: One of `experimentIds`; default the first.
            example:
              experimentIds:
                - exp_7f31a9c2
                - exp_a02c4d11
              baselineId: exp_7f31a9c2
      responses:
        '200':
          description: The runs, and every item with each run's answer and scores
          content:
            application/json:
              schema:
                type: object
                properties:
                  baselineId:
                    type: string
                  experiments:
                    type: array
                    description: The compared runs, in the order sent.
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                        name:
                          type: string
                          nullable: true
                        status:
                          type: string
                        agentVersionId:
                          type: string
                          nullable: true
                  items:
                    type: array
                    items:
                      type: object
                      properties:
                        itemId:
                          type: string
                        input: {}
                        groundTruth:
                          nullable: true
                        results:
                          type: object
                          description: >-
                            Per experiment id: the answer and its scores per
                            scorer id; null when that run has no result for the
                            item.
                          additionalProperties:
                            type: object
                            nullable: true
                            properties:
                              output: {}
                              scores:
                                type: object
                                additionalProperties:
                                  type: number
                                  nullable: true
              example:
                baselineId: exp_7f31a9c2
                experiments:
                  - id: exp_7f31a9c2
                    name: Refund tone — August
                    status: completed
                    agentVersionId: ver_a1
                  - id: exp_a02c4d11
                    name: Refund tone — shorter prompt
                    status: completed
                    agentVersionId: ver_b7
                items:
                  - itemId: dsi_2c7e91b4
                    input: Can I get a refund on an order I placed yesterday?
                    groundTruth: >-
                      Yes — orders can be refunded within 14 days. Ask for the
                      order number.
                    results:
                      exp_7f31a9c2:
                        output:
                          text: Yes — within 14 days; what is the order number?
                        scores:
                          tone-scorer: 0.92
                      exp_a02c4d11:
                        output:
                          text: Yes. Order number?
                        scores:
                          tone-scorer: 0.61
        '400':
          description: >-
            Fewer than two ids, more than ten, a duplicate, an unknown
            `baselineId`, or a run of another dataset
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    description: The class of failure.
                  details:
                    type: string
                    description: What specifically went wrong.
        '404':
          description: No such dataset or experiment in this organization
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    description: The class of failure.
                  details:
                    type: string
                    description: What specifically went wrong.
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        Organization API key, generated in studio.sidenet.ai. Backend only —
        never in a browser.

````

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