---
title: "Queries the win matrix of a benchmark."
method: GET
path: "/benchmark/{benchmarkId}/matrix/query"
tags: ["Benchmark"]
---

# Queries the win matrix of a benchmark.

`GET /benchmark/{benchmarkId}/matrix/query`

Filters apply to the underlying votes. Benchmarks without granular vote storage evaluate
 only the filters their aggregated data can answer (tags, participants, leaderboards, runs,
 prompt identifiers); demographic and vote-time filters require granular vote storage.
 Alongside the matchup outcomes in data, each response also carries votes: the
 un-binarized human vote counts on the same axes, display-only and not reflected in scoring.

## Path parameters

- `benchmarkId` string, required

## Query parameters

- `useWeightedScoring` boolean
- `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

- QueryMatrixByBenchmarkEndpointOutput
  - `index` string[], required — The participant names of the matrix rows, ordered strongest first.
  - `columns` string[], required — The participant names of the matrix columns, ordered strongest first.
  - `data` array[], required — The win counts; Data[i][j] holds the wins of Index[i] over Columns[j].
    - number[]
  - `votes` array[], required — The un-binarized human vote counts on the same axes; Votes[i][j] holds the votes of Index[i] over Columns[j]. Display-only — not reflected in the scoring behind Data.
    - number[]

## 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/versions/e42ec51c7b88/schema)
