---
title: "Update judge"
method: PATCH
path: "/v1/projects/{project_id}/judges/{judge_id}"
tags: ["judges"]
---

# Update judge

`PATCH /v1/projects/{project_id}/judges/{judge_id}`

## Request

- Base URL: `https://api.connic.co`
- URL: `https://api.connic.co/v1/projects/{project_id}/judges/{judge_id}`
- Auth: HTTP bearer

Partially updates a judge; omitted fields stay unchanged. Returns 409 while a running or paused A/B test uses the judge.

Required permission: `judges.update`.

## Path parameters

- `project_id` string, uuid, required
- `judge_id` string, uuid, required

## Request body

- JudgeUpdate: Partial update of a judge. Omitted fields are unchanged; a judge used by a running or paused A/B test cannot change.
  - `name` string, nullable: Display name, at most 200 characters.
  - `agent_name` string, nullable: Agent whose runs the judge evaluates.
  - `model` string, nullable: Model that scores runs, for example a `connic/*` model. At most 512 characters.
  - `system_prompt` string, nullable: Extra instructions for the scoring model. At most 8,000 characters.
  - `include_agent_system_prompt` boolean, nullable: Include the evaluated agent's system prompt in the scoring context.
  - `criteria` JudgeCriterion[], nullable: Scoring rubric with 1 to 20 criteria. The combined `max_score` is at most 10,000 and the combined name and description length at most 20,000 characters.
    - `name` string, required: Criterion name, unique within the judge (case-insensitive). At most 200 characters.
    - `description` string, required: What the scoring model evaluates for this criterion. At most 2,000 characters.
    - `max_score` number, required: Highest score for this criterion, greater than 0 and at most 1,000.
  - `filter_expression` string, nullable: Expression over the run's `input`, `output` and `context` that must be true for automatic evaluation. Empty matches every run.
  - `trigger_mode` 'automatic' | 'manual', nullable: `automatic` evaluates runs when they complete; `manual` evaluates only when triggered.
  - `sample_rate` number, nullable: Share of matching runs evaluated automatically, from 0 to 1.
  - `notification_threshold` number, nullable: Sends a `judge_score_low` notification when the average score, as a share of the maximum, drops below this value (0 to 1). null disables it.
  - `notification_window` integer, nullable: Number of most recent evaluations averaged for `notification_threshold` (1 to 10,000). null averages all.
  - `enabled` boolean, nullable: When false, runs are not evaluated automatically; on-demand triggers still work.

## Response `200`

Successful Response

- JudgeResponse: An LLM judge that scores one agent's runs against a rubric, with evaluation totals.
  - `id` string, uuid, required
  - `project_id` string, uuid, required: Project the judge belongs to.
  - `environment_id` string, uuid, required: Environment whose runs the judge evaluates.
  - `name` string, required
  - `agent_name` string, required: Agent whose runs the judge evaluates.
  - `model` string, required: Model that scores runs.
  - `system_prompt` string, required: Extra instructions for the scoring model.
  - `include_agent_system_prompt` boolean, required: Whether the evaluated agent's system prompt is included in the scoring context.
  - `criteria` JudgeCriterion[], required: Scoring rubric.
    - `name` string, required: Criterion name, unique within the judge (case-insensitive). At most 200 characters.
    - `description` string, required: What the scoring model evaluates for this criterion. At most 2,000 characters.
    - `max_score` number, required: Highest score for this criterion, greater than 0 and at most 1,000.
  - `filter_expression` string, required: Expression a run must match to be evaluated automatically. Empty matches every run.
  - `trigger_mode` string, required: `automatic` evaluates runs when they complete; `manual` evaluates only when triggered.
  - `sample_rate` number, required: Share of matching runs evaluated automatically, from 0 to 1.
  - `notification_threshold` number, nullable: Average score share (0 to 1) below which a `judge_score_low` notification is sent. null when disabled.
  - `notification_window` integer, nullable: Number of most recent evaluations averaged for `notification_threshold`. null averages all.
  - `enabled` boolean, required: When false, runs are not evaluated automatically.
  - `created_at` string, date-time, required
  - `updated_at` string, date-time, required
  - `avg_score` number, nullable: Average overall score of completed evaluations. null before the first one.
  - `avg_max_score` number, nullable: Average maximum possible score of completed evaluations. null before the first one.
  - `total_evaluated` integer: Number of completed evaluations.

## Other responses

- `401`: Missing or invalid API key.
- `403`: The API key lacks the required permission or access to the environment.
- `404`: The resource does not exist in this project.
- `422`: Validation Error
- `429`: Rate limit exceeded.

---

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