Judge Decision
Accept or decline the LLM judge recommendation for an N-Shot comparison. Accepted decisions apply the recommended shot value as an override automatically.
POST /v1/jobs/runs/{runId}/nshot/judge-decision accepts or declines the LLM judge's recommendation for a specific N-Shot comparison. When a run has both N-Shot and the LLM judge enabled in its validation configuration, the judge evaluates flagged (yellow/red) cells and records a judgement on each: a recommended_shot, the recommended_value, and a reasoning string explaining the choice. This endpoint records your verdict on that recommendation.
When accepted is true, the recommended shot's value is automatically applied as an override with actor_id: "judge" — no separate call to the override endpoint is needed. When false, the recommendation is recorded as declined and no override is applied; the cell keeps its majority value unless you override it manually. Either way the judgement is stamped with decided_by: "api" and a decided_at timestamp, and the full updated comparison is returned.
The intended workflow is batch review: fetch the run's [comparisons](nshot-list-shots), filter for entries where judgement.accepted is null, read each recommendation's reasoning, and submit decisions in a loop. Because accepting creates the override in the same call, a full review pass over a run is one GET plus one POST per pending recommendation.
Decisions are revisable: submitting a new decision with the opposite accepted value updates the judgement record. Note the asymmetry — accepting applies an override, but a later decline does not remove the override it created. To change the applied value after accepting, submit a [manual override](nshot-select) for the cell, which replaces the judge's override with your own.
/v1/jobs/runs/{runId}/nshot/judge-decisionBody parameters
Request
curl -X POST https://api.talonic.com/v1/jobs/runs/a1b2c3d4-e5f6-7890-abcd-ef1234567890/nshot/judge-decision \
-H "Authorization: Bearer tlnc_your_api_key" \
-H "Content-Type: application/json" \
-d '{
"document_id": "d4e5f6a7-b8c9-0123-defa-234567890123",
"field_name": "total_amount",
"accepted": true
}'Response
Response fields
Response
{
"id": "5f8e2b1a-3c4d-4e5f-8a9b-0c1d2e3f4a5b",
"run_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"document_id": "d4e5f6a7-b8c9-0123-defa-234567890123",
"field_name": "total_amount",
"status": "yellow",
"agreement_score": 0.6667,
"majority_value": "12450.00",
"comparison_method": "exact",
"values": [
{ "shot_number": 1, "value": "12450.00", "confidence": 0.95, "source_text": "Total due: 12,450.00 EUR" },
{ "shot_number": 2, "value": "12450.00", "confidence": 0.94, "source_text": "Total due: 12,450.00 EUR" },
{ "shot_number": 3, "value": "12,450.00", "confidence": 0.91, "source_text": "Total due: 12,450.00 EUR" }
],
"override": {
"selected_shot": 1,
"actor_id": "judge",
"overridden_at": "2026-07-14T11:05:00.000Z",
"from_value": "12450.00",
"to_value": "12450.00"
},
"judgement": {
"recommended_shot": 1,
"recommended_value": "12450.00",
"reasoning": "Shots agree on the amount; shot 3 kept the thousands separator. The canonical decimal form matches the field's number type.",
"accepted": true,
"decided_by": "api",
"decided_at": "2026-07-14T11:05:00.000Z"
},
"created_at": "2026-07-14T10:32:00.000Z",
"links": {
"self": "/v1/jobs/runs/a1b2c3d4-e5f6-7890-abcd-ef1234567890/nshot/comparison?document_id=d4e5f6a7-b8c9-0123-defa-234567890123&field_name=total_amount"
}
}Errors
Error responses