---
title: "Queries a benchmark's prompt ratings — a page of prompts, each with its ranked entries and the
 pairwise win matrix over them."
method: GET
path: "/benchmark/{benchmarkId}/prompt-ratings/query"
tags: ["Benchmark"]
---

# Queries a benchmark's prompt ratings — a page of prompts, each with its ranked entries and the
 pairwise win matrix over them.

`GET /benchmark/{benchmarkId}/prompt-ratings/query`

Filters apply to the underlying votes and use the same field set as the standings query. Ordering
 (extremeness by default) selects which prompts a page fits; a rating is an entry's standing against
 the other entries on its prompt, so a participant filter narrows the entries but does not refit. A
 prompt with no matching votes yields no entries.
 groupBy decides what competes. Per image, every image is its own entry and a participant
 with several images on a prompt appears several times. Per participant, its images become one
 entry rated from their pooled wins over other participants; comparisons between two of its own
 images are excluded from the rating, from both matrices, and from responseCount. Grouping
 changes only how prompts are scored, never which prompts the page holds.
 matrix.wins and matrix.votes are square and aligned to entries by position:
 row i, column j holds entry i's count against entry j. Read the axes
 off entries — the matrix carries no labels of its own.

## Path parameters

- `benchmarkId` string, required

## Query parameters

- `useWeightedScoring` boolean
- `groupBy` 'Image' | 'Participant' — What each rated entry of a prompt represents.
- `page` integer
- `page_size` integer
- `sort` string[]
- `country` object
  - `eq` string
  - `neq` string
  - `gt` string
  - `gte` string
  - `lt` string
  - `lte` string
  - `contains` string
  - `starts_with` string
  - `ends_with` string
  - `in` string[]
  - `not_contains` string
- `language` object
  - `eq` string
  - `neq` string
  - `gt` string
  - `gte` string
  - `lt` string
  - `lte` string
  - `contains` string
  - `starts_with` string
  - `ends_with` string
  - `in` string[]
  - `not_contains` string
- `gender` object
  - `eq` string
  - `neq` string
  - `gt` string
  - `gte` string
  - `lt` string
  - `lte` string
  - `contains` string
  - `starts_with` string
  - `ends_with` string
  - `in` string[]
  - `not_contains` string
- `age_bucket` object
  - `eq` string
  - `neq` string
  - `gt` string
  - `gte` string
  - `lt` string
  - `lte` string
  - `contains` string
  - `starts_with` string
  - `ends_with` string
  - `in` string[]
  - `not_contains` string
- `occupation` object
  - `eq` string
  - `neq` string
  - `gt` string
  - `gte` string
  - `lt` string
  - `lte` string
  - `contains` string
  - `starts_with` string
  - `ends_with` string
  - `in` string[]
  - `not_contains` string
- `tags` object
  - `eq` string
  - `neq` string
  - `gt` string
  - `gte` string
  - `lt` string
  - `lte` string
  - `contains` string
  - `starts_with` string
  - `ends_with` string
  - `in` string[]
  - `not_contains` string
- `participant_id` object
  - `eq` string
  - `neq` string
  - `gt` string
  - `gte` string
  - `lt` string
  - `lte` string
  - `contains` string
  - `starts_with` string
  - `ends_with` string
  - `in` string[]
  - `not_contains` string
- `leaderboard_id` object
  - `eq` string
  - `neq` string
  - `gt` string
  - `gte` string
  - `lt` string
  - `lte` string
  - `contains` string
  - `starts_with` string
  - `ends_with` string
  - `in` string[]
  - `not_contains` string
- `run_id` object
  - `eq` string
  - `neq` string
  - `gt` string
  - `gte` string
  - `lt` string
  - `lte` string
  - `contains` string
  - `starts_with` string
  - `ends_with` string
  - `in` string[]
  - `not_contains` string
- `prompt_identifier` object
  - `eq` string
  - `neq` string
  - `gt` string
  - `gte` string
  - `lt` string
  - `lte` string
  - `contains` string
  - `starts_with` string
  - `ends_with` string
  - `in` string[]
  - `not_contains` string
- `voted_at` object
  - `eq` string
  - `neq` string
  - `gt` string
  - `gte` string
  - `lt` string
  - `lte` string
  - `contains` string
  - `starts_with` string
  - `ends_with` string
  - `in` string[]
  - `not_contains` string
- `logic` 'and' | 'or'

## Response `200`

OK

- QueryPromptRatingsByBenchmarkEndpointOutput — The queried prompt ratings output.
  - `items` QueryPromptRatingsByBenchmarkEndpointOutputPrompt[], required — The prompts of this page, each with its ranked entries.
    - `promptIdentifier` string, required
    - `prompt` object, nullable
      - `id` string, required
      - `english` string, nullable
      - `original` string, nullable
      - `asset` union
        - IAssetFileAsset
          - `_t` 'FileAsset', required
          - `fileName` string, required
          - `metadata` MetadataModelCollection, required
          - `identifier` string, required
        - IAssetMultiAsset
          - `_t` 'MultiAsset', required
          - `assets` IAsset[], required
            - union
              - …
          - `metadata` MetadataModelCollection, required
          - `identifier` string, required
        - IAssetNullAsset
          - `_t` 'NullAsset', required
          - `metadata` MetadataModelCollection, required
          - `identifier` string, required
        - IAssetTextAsset
          - `_t` 'TextAsset', required
          - `text` string, required
          - `metadata` MetadataModelCollection, required
          - `identifier` string, required
    - `entries` QueryPromptRatingsByBenchmarkEndpointOutputEntry[], required
      - `id` string, required
      - `participantId` string, required
      - `participantName` string, nullable
      - `images` QueryPromptRatingsByBenchmarkEndpointOutputEntryImage[], required
        - `sampleId` string, required
        - `asset` union
          - IAssetFileAsset
            - `_t` 'FileAsset', required
            - `fileName` string, required
            - `metadata` MetadataModelCollection, required
            - `identifier` string, required
          - IAssetMultiAsset
            - `_t` 'MultiAsset', required
            - `assets` IAsset[], required
              - …
            - `metadata` MetadataModelCollection, required
            - `identifier` string, required
          - IAssetNullAsset
            - `_t` 'NullAsset', required
            - `metadata` MetadataModelCollection, required
            - `identifier` string, required
          - IAssetTextAsset
            - `_t` 'TextAsset', required
            - `text` string, required
            - `metadata` MetadataModelCollection, required
            - `identifier` string, required
      - `responseCount` integer, required
      - `rating` number, double, nullable, required
      - `rank` integer, required
    - `matrix` QueryPromptRatingsByBenchmarkEndpointOutputMatrix, required
      - `wins` array[], required
        - number[]
      - `votes` array[], required
        - number[]
  - `total` integer, required — The number of prompts the filter leaves rankable — the paging total.
  - `page` integer, required — The 1-based page index.
  - `pageSize` integer, required — The page size in prompts.
  - `corpus` QueryPromptRatingsByBenchmarkEndpointOutputCorpus, required
    - `totalResponses` integer, required
    - `distinctMatchups` integer, required

## Other responses

- `400` — Bad Request
- `401` — Unauthenticated
- `403` — Forbidden

---

[API](https://skmtc.net/rapidata/apis/rapidata-api.md) · [All operations](https://skmtc.net/rapidata/apis/rapidata-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/rapidata/rapidata-api/revisions/fdb89a6eb2fb/schema)
