Create Ground Truth Dataset
Create a ground truth dataset with POST /v1/quality/ground-truth, linked to one schema. The dataset holds verified values used for accuracy benchmarking.
POST /v1/quality/ground-truth creates an empty ground truth dataset: a schema-scoped container for manually verified field values that benchmark runs compare extraction output against. Create the dataset first, then populate it with entries; it becomes the baseline for measuring extraction accuracy.
The typical workflow is: create the dataset, then populate it using POST /v1/quality/ground-truth/:id/entries for each entry. Once populated, create a benchmark run with POST /v1/quality/benchmarks.
The response returns the dataset with document_count: 0 since it is initially empty. user_schema_id echoes the schema_id you passed in. The links.self URL points to the detail endpoint where you can retrieve the dataset with its entries.
For best results, aim for at least 30-50 entries per dataset. The schema_id scoping ensures ground truth field names align with your extraction schema, producing more meaningful benchmark comparisons.
expected_data entries should match the field names used in your extraction schema. Unmatched fields are stored but ignored during benchmark comparison./v1/quality/ground-truthBody parameters
Response
Response fields (201 Created)
Response (201 Created)
{
"id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"name": "Invoice Accuracy Set",
"description": null,
"user_schema_id": "5e6f7a8b-9c0d-1234-abcd-ef0123456789",
"document_count": 0,
"created_at": "2024-09-01T10:00:00.000Z",
"links": {
"self": "/v1/quality/ground-truth/a1b2c3d4-e5f6-7890-abcd-ef1234567890"
}
}Errors
Error responses