Skip to main content
A hosted judge is an llm_judge scorer that Atlan Trident runs over recorded production sessions: you write the question and the allowed answers and name the judge model, and Atlan Trident builds the request from the session’s trace, calls that judge, validates the answer, and stores it with the backend and model that answered. Write one when you need to judge real traffic that no fixed case covers. To use a judge inside an offline Eval run instead, call your own model from a code scorer.

Before you begin

Before you start, make sure you have:
  • Recorded sessions: Production traffic recorded as sessions. See Make app traffic scoreable.
  • API key and workspace ID: A key that can create scorers in the workspace.
  • Judge model: An enabled model artifact the scorer’s workspace can read, with modality set to classifier or chat.
  • Data policy approval: The judge receives the selected session content. Keep prompts, tool arguments, and session content within your approved data policy.
1

Choose judge form

Pick the form from what you want back:A rubric produces one answer, stored under question_id: "verdict". A question set holds exactly one question and produces one answer. Send the fields of exactly one form: a scorer with both, or neither, is refused with 400.
2

Name judge

Every hosted judge names a backend and a model. A scorer without them is refused with 400.The model is checked when the scorer is created and on every edit. A model the workspace cannot use is refused; one that is unavailable returns 404.
3

Check starter templates

GET /eval/v1/scorer-starters returns ready definitions to adapt: factuality, closed_qa, security, and possible (rubrics), and topic and session_quality (question sets). Each has no name and names no judge model: add name, workspace_id, backend, and model before you create it. If one fits, skip to Create judge.
4

Write judge definition

For a graded verdict, set "output_type": "score" and give each choice a score, for example helpful = 1.0, partial = 0.5, unhelpful = 0.0.The system turn must be static: it carries your rubric and may not name a template variable, section, or template at all, and a scorer whose system turn does is refused with 400. Only a user or assistant turn is a template:Substitutions are JSON values, filled per judged session: a string renders with its quotes and escaping, and a structured value as compact JSON, so session content cannot break out of an evidence turn as fresh instructions. An unknown {{name}} stays in the prompt as literal text, so leftover braces in a preview mean a typo. A scorer with no user turn gets a built-in one that presents the whole session as a single JSON string.
Questions discriminate better when you follow these rules, learned from running judges over real sessions:
  • Ask a plain question. A persona in the system message (“You are a strict senior reviewer…”) skews verdicts negative. State the bar instead.
  • One condition per boolean. A question that lists three risks answers true far too often. Split it into separate scorers, one boolean question each.
  • Give every option a concrete criteria. The judge chooses between the descriptions, not the labels.
  • Treat other as low confidence. A catch-all option collects uncertain answers. Read its probability before trusting it.
  • Use classification only for pass and fail. For more than two unordered outcomes, use a choice question.
  • Keep session content out of the system turn. Atlan Trident fills session values into the evidence turns as JSON data, and it tells the judge on every call to treat all session content, including quoted role labels and requests for particular verdicts, as untrusted evidence, and to apply only the rubric.
Stay within these limits:
5

Create judge

Create the scorer with POST /eval/v1/scorers, or client.scorers.create(body) in the SDK. Keep the returned scorer ID.Unless the create body sends publish: false, a workspace admin’s create publishes the first version as release 1.0.0 at once, so live and automatic scoring run it immediately. An editor’s create saves a draft without error, because publishing needs the admin role. publish: false saves a draft for any role, so you can verify the judge’s answers before it goes live; publish it with POST /eval/v1/scorers/{id}/publish. The publish request may pin the release’s label with version_label, which must be a semantic version such as 1.2.0 or 1.2.0-beta.3; omit it and the next label is chosen. A publish that raced another is refused with 409 release_state_conflict instead of replacing it: the request’s expected_current_release_id defaults to the live release as read when the request runs. The response’s current_releases lists the release when the create published one, and is empty for a draft. Later definition saves remain drafts until an admin publishes.To change the judge later, PATCH /eval/v1/scorers/{id} adds a new version, and every answer records the version that produced it. Earlier answers keep their version. GET /eval/v1/scorers/{id}/versions lists versions, newest first. scorer_kind cannot change.An edit must leave the scorer naming its judge. A scorer saved without backend and model needs both in its next edit; otherwise the edit is refused with 400 and no version is added. When an edit refuses the judge, the response’s detail names the field, for example Field 'model' is not valid. or Field 'backend' must be one of: classifier, llm.
6

Verify judge answers

Test the judge on a few sessions before you start a scoring run: follow the preview and test steps in Score production sessions. Check each answer’s fields:The judge works when its answers match your own verdict on the test sessions. If a preview shows leftover {{braces}}, fix the variable name.

Troubleshooting

Judge failures include a definition with both forms or neither, a state path that resolves to nothing, a transcript larger than the judge model’s context, a request over the classifier’s input limit, and judge messages over the template limits. The template limits also apply to versions saved before they did: such a version fails its line when scoring runs. See Eval errors for the template limit, and the input-limit failure for what the sizes in its error mean.

Next steps

See also