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.
Use samples.length — not document_count — to measure the dataset: the counter is maintained by the platform's ground-truth workflow and does not track entries added through the API, so it can read 0 while samples holds real entries. For large datasets the samples array makes the response sizable, since there is no pagination on this endpoint. The user_schema_id shows which extraction schema the dataset is scoped to, which keeps benchmark comparisons meaningful by ensuring field name alignment.
A pre-benchmark audit pays for itself: check that every expected_data object uses exactly the schema's field names (a misspelled key scores as a permanent miss), that each document_id still exists and has a completed extraction under the schema, and that numeric expected values are actual numbers where the schema types them — the comparator applies a 0.01 numeric tolerance only to numeric-typed fields.
/v1/quality/ground-truth/:idRequest
curl https://api.talonic.com/v1/quality/ground-truth/a1b2c3d4-e5f6-7890-abcd-ef1234567890 \
-H "Authorization: Bearer tlnc_..."Entries in samples are returned oldest-first (created_at ascending) and are filtered by document visibility: if source IAM rules hide a document from the user who minted your API key, that document's entries are silently omitted from samples. A dataset that looks smaller through the API than in the platform UI usually indicates a restricted key rather than missing data.
Response (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