Skip to main content

Get / Delete Ground Truth Dataset

Retrieve a golden sample dataset with every expected value, or delete it permanently — deletion cascades to its validation runs. GET read, DELETE write scope.

GET /v1/validation/ground-truth/{id} retrieves the full detail of a golden sample (Ground Truth dataset), including every manually verified expected value entry; DELETE on the same path permanently removes it. These datasets are the reference side of Benchmarks: accuracy measurement of extraction output, distinct from the in-pipeline checks that gate results before delivery.

Call GET before starting a validation run to verify that expected values are correct and complete. The values array contains every document-field pair with its expected_value, document_id, and field_name, ordered oldest-first. Review these to ensure the benchmark data reflects your current extraction requirements — a stale expected value shows up later as a false mismatch in run results, and a systematically wrong one silently caps the best score any run can achieve.

The values array is filtered by document visibility: if source IAM rules hide a document from the user who minted your API key, that document's expected values are omitted from the response. user_schema_id confirms which schema the dataset is bound to (it is always set). entry_count on the detail response is null; values.length is the count after visibility filtering, and the list endpoint reports the unfiltered total.

Deleting a golden sample is destructive beyond the dataset itself: validation runs that reference the dataset are removed with it (the reference cascades), along with their per-field results. Export or record any scores you need before deleting. To update individual entries, recreate the dataset in the Talonic platform with corrected values and point new validation runs at it.

DELETE cascades: removing a golden sample also removes the validation runs that were scored against it, including their per-field results. This is not a soft delete — capture any accuracy history you need before calling it.
GET/v1/validation/ground-truth/{id}

Request

curl https://api.talonic.com/v1/validation/ground-truth/a1b2c3d4-e5f6-7890-abcd-ef1234567890 \
  -H "Authorization: Bearer tlnc_..."

Response

Response fields (GET)

idstringDataset UUID.
namestringDataset name.
user_schema_idstringSchema this dataset is bound to. Always set.
entry_countnullReserved. Currently always null through the public API — use values.length instead.
created_atstringISO 8601 creation timestamp.
updated_atstringISO 8601 last update timestamp.
linksobjectRelated resource URLs (self).
valuesarrayExpected value entries, oldest first. Filtered by document visibility for your key.
values[].idstringEntry UUID.
values[].document_idstringDocument UUID this expected value applies to.
values[].field_namestringField key.
values[].expected_valuestringThe expected (ground-truth) value for this field.
values[].created_atstringISO 8601 timestamp.

Response (GET)

{
  "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
  "name": "Invoice Validation Set",
  "user_schema_id": "b2c3d4e5-f6a7-8901-bcde-f12345678901",
  "entry_count": null,
  "created_at": "2024-08-01T00:00:00.000Z",
  "updated_at": "2024-08-01T00:00:00.000Z",
  "links": {
    "self": "/v1/validation/ground-truth/a1b2c3d4-e5f6-7890-abcd-ef1234567890"
  },
  "values": [
    {
      "id": "c3d4e5f6-a7b8-9012-cdef-123456789012",
      "document_id": "d4e5f6a7-b8c9-0123-defa-234567890123",
      "field_name": "invoice_number",
      "expected_value": "INV-2024-0042",
      "created_at": "2024-08-01T00:00:00.000Z"
    }
  ]
}

Response (DELETE)

{
  "deleted": true
}

Errors

Error responses

401unauthorizedMissing or invalid API key.
404not_foundGolden sample not found or does not belong to your organization.
429rate_limitedToo many requests. Retry after the period indicated in the Retry-After header.

Frequently asked questions

Does deleting a golden sample delete its validation runs?+
Yes. The dataset reference cascades, so validation runs scored against the deleted dataset are removed along with their per-field results. The underlying job runs and documents are not affected.
Can I update individual expected values in a dataset?+
Not through the public API. Expected values are curated with the dataset in the Talonic platform; to change them, recreate the dataset there with corrected entries, then point new validation runs at it.
What scope do I need to delete a dataset?+
DELETE requires an API key with write scope, while GET only needs read scope. Keys are scoped when minted, so a read-only integration cannot remove benchmark data.
Why does the values array look incomplete?+
Expected values are filtered by document visibility: entries for documents hidden from your API key's minting user by source IAM rules are omitted. A restricted key sees a subset; the dataset itself is unchanged.
Are expected values typed?+
No — expected_value is stored and returned as a string, whatever the underlying field type. When you post-process results, compare against the string form (the validation engine itself normalizes types during comparison).