Human review and judge calibration
An LLM judge is only useful if it agrees with the people who know what a good answer looks like. Human review queues collect those people's verdicts. An admin creates a queue, names its reviewers and fills it with eval results, sampled production responses or the real side of shadow evaluations. Reviewers label each item pass or fail, with an optional score from 0 to 1 and a comment. The calibration report then compares the human consensus with every judged metric, and the labelled items export to a dataset you can run evals on. Like the rest of evals this is an enterprise feature, and every /eval/review route returns 403 without a license.
A real-world scenario
An LLM judge grades support answers as pass or fail, and the team is not sure it agrees with their senior agents. They put 200 judged answers in a queue for two agents, each answer labelled by both, then read the calibration report to see how often the judge and the agents agree, and export the agreed labels as a golden dataset for later runs.
Steps
- In the Admin UI open Evals, then the Review tab, and create a queue named
support answerswith the reviewersaliceandboband two labels per item. - Open the queue and add the results of a completed run. The API calls for both steps are in Golden datasets.
- Alice and Bob open Review under Developer Tools, click Open on the queue, then Start reviewing, and press Pass (p) or Fail (f) on each item.
- Back on the queue in Evals, read the calibration report, or call
GET /eval/review/queues/{queue_id}/calibration. - Export a golden dataset from the open queue, or call
POST /eval/review/queues/{queue_id}/to_dataset.
Expected result
The queue card shows how many items are pending and done. The calibration report gives the agreement between the human consensus and each judged metric with its kappa band and a suggested threshold, and the export creates a dataset whose items keep the review item id as item_id.
Queues
{
"name": "support answers",
"reviewers": ["alice", "bob"],
"labels_per_item": 2,
"score_enabled": true,
"instructions": "Pass when the answer is correct and polite."
}
| Field | Meaning |
|---|---|
name | 1 to 200 characters, unique among the queues of one owner. Two teams can each have a queue with the same name, and one team cannot learn the names of another team's queues. |
description | Up to 2,000 characters, shown to admins and on the reviewer's queue card. Optional. |
reviewers | Up to 100 user ids. Each must be an internal user or a proxy admin, anyone else is refused with a 400 that names them. |
labels_per_item | How many reviewers label an item before it counts as done, 1 to 5, default 1. More reviewers give a fairer verdict and take longer. Lowering it later completes items that already have enough labels. |
score_enabled | Whether reviewers may add a 0 to 1 score, default true. On, a score measures how good an answer is, not only whether it passes. Off, the score field is hidden and a label with a score is refused with 400. |
instructions | Up to 20,000 characters, shown to reviewers above every item. |
blind | Blind review, default false. On, reviewers do not see the expected answer and each gets the items in their own shuffled order, so neither a reference answer nor the order can sway them. Off, the expected answer shows and items come oldest first. See blind review. |
A label's comment holds up to 4,000 characters. GET /eval/review/queues/{queue_id}/items filters items by pending (true or false), source (eval_result, production or shadow) and reviewer, with page_size up to 200. GET /eval/review/assigned lists at most the first 100 queues that name the caller, without paging.
Membership is read on every request, so removing someone from reviewers takes their access away at once. Deleting a queue deletes its items and labels. Datasets exported from it keep their items.
Filling a queue
Each source adds items once. Enqueueing the same result or request again reports it under duplicates and adds nothing. Every source takes a sample with a size up to 1000 (100 when left out) and a strategy of latest or random. A queue holds at most 10,000 items, and an enqueue that would pass that is refused with a 400, so calibration and export always see every item.
| Route | Adds |
|---|---|
POST /eval/review/queues/{queue_id}/from_run | Results of a completed run, filter failed (the default), passed or all, optionally one model. The scorer's verdict is kept with the item for calibration. Errored and unscored results are skipped. |
POST /eval/review/queues/{queue_id}/from_logs | Production responses drawn from spend logs with the same filters as a dataset from logs. Needs general_settings.store_prompts_in_spend_logs. Only chat completions responses carry a reply text today. |
POST /eval/review/queues/{queue_id}/from_shadow | The response that was served to the caller for requests a shadow evaluation judged, one item per request, filtered by job_id, model, start, end and outcome. A pass means the served response was acceptable. The judge's preference is kept in the item's metadata for admins and never counts as a verdict. |
Production and shadow items are copies of request content, so they are skipped when the key, team or organization the request ran under requires zero data retention, when that data policy cannot be read, and when the logged prompt or reply was redacted. The response counts what was skipped and why. Every other restriction in that data policy is stored with the item, and run results keep the data policy of their dataset item.
{"added": 37, "duplicates": 0, "skipped_no_content": 2, "skipped_redacted": 0, "skipped_missing_item": 0, "skipped_data_policy": 1}
Labelling
Reviewers work one item at a time. POST /eval/review/queues/{queue_id}/next claims the next item for the caller for 30 minutes, or returns the one they already hold, so reloading the page resumes it. Two reviewers never get the same item at once. Items an admin assigned to the caller come first, and items assigned to another reviewer are left for that reviewer. An item comes back only while it still needs labels, and never to a reviewer who labelled or skipped it.
POST /eval/review/items/{review_item_id}/label takes {"passed": true, "score": 0.8, "comment": "..."}. A first label is accepted only from the reviewer holding an unexpired claim. Without one the route answers 409. A reviewer can change their own label at any time and it still counts once. Labelling releases the claim. POST /eval/review/items/{review_item_id}/skip hides the item from that reviewer for good and hands it to the others.
Labels are blind. What a reviewer sees is the input, the response, the expected answer and the context, with the queue's instructions. They never see the automated verdict, other reviewers' labels, the model, the run or the request the item came from. A queue with blind on also hides the expected answer and shuffles the order for each reviewer.
With labels_per_item above 1 the labels are collected one reviewer after another. The consensus is the majority of pass and fail, and an even split is a tie that counts as undecided.
Calibration
GET /eval/review/queues/{queue_id}/calibration compares the human consensus with each automated verdict, per scorer configuration and model. A scorer with a different judge model or different criteria is reported on its own line. Only items whose required labels are in and do not tie are counted, and ties are reported as excluded_ties.
| Field | Meaning |
|---|---|
n | Items compared. |
agreement | Share of items where the judge and the humans gave the same pass or fail. |
cohen_kappa | Agreement corrected for chance, null when there is nothing to compare or both sides gave one answer throughout. |
confusion | true_pass, false_pass (the judge passed what humans failed), false_fail and true_fail. |
mean_abs_score_error | Mean distance between the human score and the judge's score, over items that have both. |
low_sample | true under 30 items, when the numbers move a lot with each new label. |
current_threshold, suggested_threshold | The scorer's pass threshold, and the cut among the judge's own scores that would have agreed with humans most often. Scorers without a threshold get neither. The suggestion is never applied for you. |
inter_rater_agreement | Mean pairwise agreement between reviewers on items with two or more labels. The reviewer agreement report breaks it down per reviewer and per pair. |
Without run_id the verdicts are the ones stored when each item was enqueued from a run. With run_id they are that run's results for items exported from this queue, since an exported item keeps its review item id as its item_id. That lets you calibrate a new judge against labels you already have by exporting the queue and running the new scorer on that dataset. model narrows the report to one model.
Golden datasets
POST /eval/review/queues/{queue_id}/to_dataset writes decided items to a new dataset (name) or appends them to an existing one (dataset_id).
| Field | Meaning |
|---|---|
include | passed (the default), failed or all. |
output_as_expected | When true (the default) an item humans passed gets its response as the expected answer. |
Each item keeps its review item id as item_id, so appending again skips items already there. Each item also keeps the data policy stored with its review item, so every eval call made for it on that dataset stays within the policy of the request it came from, as with a dataset drawn from logs. An append is refused while the dataset has runs in progress or enabled schedules, and both paths are refused when the result would pass the dataset size limits. Exported items carry the source request id and the subject ids in their metadata, so a data subject erasure also removes them from the dataset.
curl -X POST "$SPANWAY_URL/eval/review/queues" \
-H "Authorization: Bearer $SPANWAY_MASTER_KEY" -H "Content-Type: application/json" \
-d '{"name": "support answers", "reviewers": ["alice", "bob"]}'
curl -X POST "$SPANWAY_URL/eval/review/queues/$QUEUE_ID/from_run" \
-H "Authorization: Bearer $SPANWAY_MASTER_KEY" -H "Content-Type: application/json" \
-d '{"run_id": "'"$RUN_ID"'", "filter": "all"}'
curl "$SPANWAY_URL/eval/review/queues/$QUEUE_ID/calibration" \
-H "Authorization: Bearer $SPANWAY_MASTER_KEY"
curl -X POST "$SPANWAY_URL/eval/review/queues/$QUEUE_ID/to_dataset" \
-H "Authorization: Bearer $SPANWAY_MASTER_KEY" -H "Content-Type: application/json" \
-d '{"name": "support golden set"}'
Who can do what
Queue management, the items list, calibration, export, the assignment board and reviewer agreement are admin routes. Proxy admins can do everything. Admin viewers can read queues, items and calibration. A custom role with evals.read reads the same, and one with evals.write also creates, changes and deletes queues, adds run results, deletes items, assigns items, takes them back and exports. Adding production or shadow items stays with proxy admins because it copies request bodies of every team. For the same reason a caller let in only by a custom role sees the input and response of production and shadow items as redacted in the items list and the admin item route, as with the log preview. Run results show in full. Golden datasets exported from production items follow the dataset permissions, so export them only to datasets meant for those readers.
Reviewing is separate. The reviewer routes are GET /eval/review/assigned, POST /eval/review/queues/{queue_id}/next, GET /eval/review/items/{review_item_id}, and the label and skip routes under it. They open only to users named in the queue whose role is internal user or proxy admin, so a proxy admin labels only when assigned. Internal viewers, admin viewers, keys without a user, team service accounts and CI keys never review. The route check lets internal users reach those paths with those methods only, and a custom role neither widens nor narrows who reviews, since that is decided by the queue. Reviewers see production content from every team the queue was filled from, so assign people who may see it.
Queue creation, changes and deletion, each enqueue with its counts, item deletion, assignments and exports are written to the audit log with the acting user, never with item content. Labels are not written to the audit log. They are kept in the label table with the reviewer and the time, where erasure can reach them.
Retention and data subject requests
Review items are deleted by the spend log cleanup job once they are older than maximum_eval_review_retention_period, or older than maximum_spend_logs_retention_period when that is shorter, and their labels go with them. Age counts from when the request was logged for production and shadow items, and from when the result was written for run results, never from when the item was enqueued, so an item copied from an old log is deleted with that log. With neither set, items are kept. Both are listed on the compliance retention panel.
Each production and shadow item records the user and end user of the request it came from. Erasing a user deletes the items copied from their requests, removes golden items exported from them out of every dataset, keeps their labels as a reviewer under the erasure pseudonym and takes them off every queue's reviewer list. Erasing an end user deletes the items copied from their requests and their golden copies. A data subject export includes the review items copied from the subject's requests and, for a user, the labels they wrote.
Admin UI
The Evals page has a Review tab. It lists queues with pending and done counts and creates a queue. Opening one lets you edit its name, reviewers, labels per item, instructions and scoring, add run results, shadowed responses or production logs picked with the same filters as a dataset from logs, see the calibration report with the kappa band, the confusion counts, a low sample flag and the suggested threshold, optionally against a run, page through the items with their consensus and a link to the run ledger for production and shadow items, export a golden dataset and delete the queue after a confirmation. The open queue also shows the assignment board with Share out unassigned items and Take back, and the reviewer agreement panel. Edit queue has the Blind review switch.
Reviewers use the Review page under Developer Tools, shown to internal users and proxy admins. It lists the queues assigned to them with what is left, and opening one shows one item at a time with Pass, Fail and Skip buttons, or the p, f and s keys, an optional score and a comment.
Audit log
Creating, changing and deleting a queue, adding items to it, removing an item and exporting a golden dataset each write an audit log row. Queue rows go to Spanway_EvalReviewQueueTable: created and deleted hold the queue as it was, updated holds the queue before and after the change, and adding items is an updated row with enqueued_from and the counts of added and skipped items. Assigning items and taking them back are updated rows with the item ids and who held them, as the assignment board page shows. Removing an item is a deleted row on Spanway_EvalReviewItemTable that names the queue, the source and the source id, never the prompt or answer. An export is an exported row. Labels and skips are reviewers' work and write no audit row.
Errors
Review routes answer errors as {"detail": {"error": "<message>"}}. The same messages are in the error reference.
| Status | Message | Meaning and fix |
|---|---|---|
| 403 | The 'evals' feature needs a Spanway enterprise license. ... | The gateway has no enterprise license. Add one that lists evals. |
| 403 | Your Spanway license does not include the 'evals' feature. Contact sales@spanway.ai to add it. | The license leaves evals out. Ask for one that includes it. |
| 403 | Only proxy admins can read this resource or Only proxy admins can change this resource | Your role may not read or change review queues. Use a proxy admin key or a custom role with evals.read or evals.write. |
| 403 | you are not a reviewer of queue <queue_id> | Only users named on the queue may label it. Ask an admin to add you. |
| 400 | unknown user(s): <ids> or only internal users and proxy admins can review: <ids> | A reviewer does not exist, or has a role that may not review. Fix the reviewer list. |
| 400 | nothing to update | A change was sent with no fields. Send at least one field. |
| 400 | run <run_id> is <status>, only completed runs can be reviewed | Wait for the run to complete. |
| 400 | the run's scorer cannot be read: <reason> | The run's scorer settings are damaged. Start a new run. |
| 400 | no spend log rows match the filters or no shadow attempts match the filters | Nothing matched. Widen the time window or the filters. |
| 400 | none of the matching spend log rows carry a request body. Set general_settings.store_prompts_in_spend_logs: true ... | Production review needs stored prompts. Turn on store_prompts_in_spend_logs, then wait for new traffic. |
| 400 | queue <queue_id> collects pass or fail only, send no score | Leave the score out for this queue. |
| 400 | not reviewers of queue <queue_id>: <ids> | Work can only be assigned to reviewers named on the queue. Add them first. |
| 400 | queue <queue_id> holds <n> items and adding <m> would pass the limit ... | Delete items or use another queue. |
| 400 | <reason>, wait for them or disable them before appending | The target dataset has runs in progress or enabled schedules. |
| 400 | A dataset size message | The export would make the dataset larger than a dataset may be. Export fewer items or into a new dataset. |
| 400 | run <run_id> has no result for any decided item of this queue | The calibration run did not score the queue's items. Pick the run the items came from. |
| 400 | queue <queue_id> has no decided item matching include | Nothing is decided yet for that choice. Label more items or change include. |
| 404 | queue_id=<id> not found, review_item_id=<id> not found | The id is wrong, or the queue belongs to another team, which answers 404. |
| 404 | run_id=<id> not found or dataset_id=<id> not found | The run or the dataset does not exist. Check the id. |
| 409 | a review queue named '<name>' already exists | Your team or organization already has a queue with that name. Choose another name. |
| 409 | a dataset named '<name>' already exists | Pick another dataset name, or export into the existing dataset by id. |
| 409 | claim the item with POST /eval/review/queues/{queue_id}/next before labelling it | The 30 minute claim ran out. Claim the next item again. |
Logs
The review routes write no operator log lines. The daily cleanup writes one line when it removes items past their retention.
| Level | Line | Meaning | Action needed |
|---|---|---|---|
| INFO | Deleted <n> expired eval review items | Review items older than the retention period were removed with their labels. | None. |
Related
- Review assignment board, blind review and reviewer agreement for sharing work out and checking reviewers against each other.
- Review page for the reviewer screen.
- Evals page for the admin Review tab.
- Evals for judged scorers and datasets.