---
title: "GROUP BY judge causes with exact row counts for one rubric version, never a model summary"
method: GET
path: "/v1/admin/reply-quality/causes"
tags: ["admin"]
---

# GROUP BY judge causes with exact row counts for one rubric version, never a model summary

`GET /v1/admin/reply-quality/causes`

## Request

- Base URL: `https://api.patricia.app` (the document declares no server; this is the origin it was published from)
- URL: `https://api.patricia.app/v1/admin/reply-quality/causes`
- Auth: HTTP bearer

Ranks replies below the passing band with a GROUP BY over the judge reply type and outcome taxonomy. It uses exact scorecard row counts and total score lost, never a model summary. The route covers one rubric version at a time by default. Every number is the judge's own grading; a staff review never adjusts it.

## Query parameters

- `tenant_id` string, uuid, nullable: Drill into one workspace; omit for the fleet view.
- `since` string, date-time, nullable: Window start (UTC). Defaults to 28 days before `until`.
- `until` string, date-time, nullable: Window end, exclusive (UTC). Defaults to now.
- `scorer_version` string: Restrict to one rubric version, or 'all' to read across every version.
- `limit` integer: Maximum judge-taxonomy groups returned.

## Response `200`

Successful Response

- ReplyQualityCauses: The deterministic cause ranking and its scorecard denominator. The repository reads the denominator and ranking in one statement. Both values therefore come from one database snapshot. The denominator counts scorecards only. A run that produced no reply has no scorecard and is excluded by construction, never by a filter.
  - `since` string, date-time, required
  - `until` string, date-time, required
  - `scorer_version` string, nullable: Null when the window was read across every rubric version.
  - `scored_in_window` integer, required
  - `below_passing` integer, required
  - `passing_from` number, required
  - `causes` LowScoreCause[], required
    - `reply_type_code` string, required
    - `outcome_code` string, required
    - `below_passing` integer, required: How many replies in this group fell below the passing band, never the group's total.
    - `mean_overall` number, required: The group's mean overall score. It shows the shape of the loss and does not set the rank.
    - `score_lost` number, required: The group's total distance below the passing band. This is the ranking key.
  - `truncated` boolean, required: True when the taxonomy-row limit can hide more cause groups.

## Other responses

- `400`: Bad request
- `401`: Unauthorized
- `403`: Forbidden. Inspect response body `code` for the specific reason (for example: PERMISSION_DENIED, EMAIL_NOT_VERIFIED, TENANT_ACCESS_REQUIRED, ROLE_UNRESOLVED)
- `404`: Not found
- `422`: Validation error

---

[API](https://skmtc.dev/patricia/apis/patricia-api.md) · [All operations](https://skmtc.dev/patricia/apis/patricia-api/llms.txt) · [OpenAPI document](https://skmtc.dev/patricia/apis/patricia-api/revisions/0dfb44495ea1?raw)
