Get Dataset
Retrieve a ground truth dataset by ID with GET /v1/quality/ground-truth/:id. Returns metadata, entry count, and every verified entry in the samples array.
GET /v1/quality/ground-truth/:id retrieves a single ground truth dataset with its metadata and all of its verified entries. The response includes a samples array with the actual ground truth entries, allowing you to inspect the expected values for each document before you benchmark extraction accuracy against them.
Use this endpoint to inspect the dataset contents before running a benchmark. The samples array contains all ground truth entries with their document_id, expected_data (key-value map of verified field values), and optional notes. This lets you verify the dataset is correctly populated.
The document_count field shows how many entries exist. For large datasets, the samples array may produce a sizable response. The user_schema_id shows which extraction schema the dataset is scoped to, which keeps benchmark comparisons meaningful by ensuring field name alignment.
/v1/quality/ground-truth/:idResponse (GET)
Response fields
Response
{
"id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"name": "Invoice Accuracy Set",
"description": "Manually verified invoices for Q3 2024",
"user_schema_id": null,
"document_count": 50,
"created_at": "2024-09-01T10:00:00.000Z",
"links": {
"self": "/v1/quality/ground-truth/a1b2c3d4-e5f6-7890-abcd-ef1234567890"
},
"samples": [
{
"id": "b2c3d4e5-f6a7-8901-bcde-f12345678901",
"document_id": "doc_abc123",
"expected_data": {
"vendor_name": "Acme Corp",
"total_amount": 14250.00,
"invoice_number": "INV-2024-0847"
},
"notes": null,
"created_at": "2024-09-05T12:00:00.000Z"
}
]
}Removing ground truth data
The public API does not expose a delete operation for the dataset itself. To remove outdated ground truth data, delete individual entries with DELETE /v1/quality/ground-truth/:datasetId/entries/:entryId, or create a fresh dataset with corrected entries and point new benchmark runs at it. Completed benchmark runs keep their results and their dataset_id reference either way, so historical accuracy scores stay intact.
Errors
Error responses