Comparisons
List every per-cell N-Shot comparison for a job run: per-shot values with confidence and source text, agreement status and score, overrides, and judgements.
GET /v1/jobs/runs/{runId}/nshot/comparisons retrieves every per-cell comparison for a job run — one entry per document-field pair that the N-Shot evaluation covered. Each comparison shows the value each shot produced, the agreement status (green/yellow/red) with its numeric agreement_score, the majority_value, the comparison_method used, and any override or judge decision already applied. Use it to drill into exactly where extraction diverges across shots.
Each entry in the values array carries more than the raw value: shot_number, value, the shot's own extraction confidence, and source_text — the document passage the shot extracted the value from. When two shots disagree, comparing their source_text usually reveals whether they read different regions of the document (a real ambiguity) or read the same region differently (a formatting or normalization issue you can fix with a field instruction).
The comparison_method is chosen per field from the field's data type: exact for dates and numbers (string equality after normalization), fuzzy for short text (Jaro-Winkler similarity), and semantic for long text (an LLM scores whether the values mean the same thing). A yellow status on a semantic field is softer evidence of divergence than a yellow on an exact field, so triage exact-method disagreements first.
Most integrations start with GET /v1/jobs/runs/{runId}/nshot/summary to check the overall agreement_rate, then fetch this list and filter for status: "red" and status: "yellow" entries. Use the override and judgement fields to track review state: a non-null override means a value was already corrected, and a judgement with accepted: null is a pending LLM recommendation still awaiting a decision via the judge-decision endpoint.
/v1/jobs/runs/{runId}/nshot/comparisonsRequest
curl https://api.talonic.com/v1/jobs/runs/a1b2c3d4-e5f6-7890-abcd-ef1234567890/nshot/comparisons \
-H "Authorization: Bearer tlnc_your_api_key"Response
Response fields
Response
{
"data": [
{
"id": "5f8e2b1a-3c4d-4e5f-8a9b-0c1d2e3f4a5b",
"run_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"document_id": "d4e5f6a7-b8c9-0123-defa-234567890123",
"field_name": "invoice_number",
"status": "green",
"agreement_score": 1.0,
"majority_value": "INV-2024-001",
"comparison_method": "exact",
"values": [
{ "shot_number": 1, "value": "INV-2024-001", "confidence": 0.98, "source_text": "Invoice No: INV-2024-001" },
{ "shot_number": 2, "value": "INV-2024-001", "confidence": 0.97, "source_text": "Invoice No: INV-2024-001" },
{ "shot_number": 3, "value": "INV-2024-001", "confidence": 0.99, "source_text": "Invoice No: INV-2024-001" }
],
"override": null,
"judgement": null,
"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=invoice_number"
}
}
]
}Errors
Error responses