Comparisons
List per-document field comparisons for N-Shot evaluation across job runs. Returns all comparisons for a specific job run.
Retrieve all per-document field comparisons for a job run. Each comparison shows the values produced by each shot, the agreement status (green/yellow/red), the majority value, and any override or judge decision that has been applied. Use this to drill into specific fields and understand where extraction diverges across shots.
/v1/jobs/runs/{runId}/nshot/comparisonsResponse
Response fields
Response
{
"data": [
{
"id": "cmp-uuid-1",
"run_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"document_id": "doc-uuid-1",
"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" },
{ "shot_number": 2, "value": "INV-2024-001" },
{ "shot_number": 3, "value": "INV-2024-001" }
],
"override": null,
"judgement": null,
"created_at": "2024-09-14T10:32:00.000Z",
"links": {
"self": "/v1/jobs/runs/a1b2c3d4-e5f6-7890-abcd-ef1234567890/nshot/comparison?document_id=doc-uuid-1&field_name=invoice_number"
}
}
]
}Most integrations start with GET /v1/jobs/runs/{runId}/nshot/summary to check the overall agreement_rate, then drill into this endpoint to find status: "red" and status: "yellow" comparisons that need attention. Use the override and judgement fields to track which comparisons have already been reviewed and which still need a decision.
Errors
Error responses