@talonic/docs 0.21.31 → 0.21.33
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/content.js +213 -76
- package/dist/index.js +2 -1
- package/dist/index.js.map +1 -1
- package/dist/seo.js +963 -18
- package/openapi.json +961 -17
- package/package.json +1 -1
package/dist/content.js
CHANGED
|
@@ -293,7 +293,8 @@ var API_NAV_SECTIONS = [
|
|
|
293
293
|
{ id: "fields", label: "Fields", children: [
|
|
294
294
|
{ id: "list-fields", label: "List Fields" },
|
|
295
295
|
{ id: "field-harmonization", label: "Harmonization" },
|
|
296
|
-
{ id: "get-field", label: "Get Field" }
|
|
296
|
+
{ id: "get-field", label: "Get Field" },
|
|
297
|
+
{ id: "field-contract", label: "Registry Contract" }
|
|
297
298
|
] },
|
|
298
299
|
{ id: "registry", label: "Registry", children: [
|
|
299
300
|
{ id: "registry-query", label: "Query" },
|
|
@@ -19269,9 +19270,9 @@ var sections32 = [
|
|
|
19269
19270
|
seoTitle: "Get Resolution Results: Original vs Resolved \u2014 Talonic Docs",
|
|
19270
19271
|
description: "Read a resolution run's per-field results with GET /v1/resolutions/{id}/results: original vs resolved values, the resolution step applied, and confidence.",
|
|
19271
19272
|
content: [
|
|
19272
|
-
{ type: "paragraph", text: "Retrieve the **resolution results** for a run.
|
|
19273
|
+
{ type: "paragraph", text: "Retrieve the **resolution results** for a run. `data` holds one row per document **and field**: the raw extracted value alongside the canonical value resolution produced, the `resolution_step` (strategy) that made the match, and a `confidence` score. Rows appear as documents finish resolving, so an early read during `processing` returns only the documents flushed so far; a document that has not produced any field yet contributes no rows." },
|
|
19273
19274
|
{ type: "paragraph", text: "Rows are returned oldest-first (`created_at` ascending) with no pagination. Results are also filtered by source visibility: rows whose document is hidden from you under your organization's source visibility rules are dropped from the response entirely, so two API keys can legitimately see different row counts for the same run." },
|
|
19274
|
-
{ type: "callout", variant: "info", text: "
|
|
19275
|
+
{ type: "callout", variant: "info", text: "resolution_step names the strategy that produced the resolved value \u2014 for example lookup (reference table match), registry_transfer, deterministic_compute, or source_extraction when the extracted value stood as-is. It is null when the engine recorded no method for the cell." },
|
|
19275
19276
|
{
|
|
19276
19277
|
type: "endpoint",
|
|
19277
19278
|
method: "GET",
|
|
@@ -19301,13 +19302,15 @@ var sections32 = [
|
|
|
19301
19302
|
title: "Response fields",
|
|
19302
19303
|
params: [
|
|
19303
19304
|
{ name: "data", type: "array", description: "Array of resolution result objects, ordered by created_at ascending." },
|
|
19304
|
-
{ name: "data[].id", type: "string", description: "
|
|
19305
|
+
{ name: "data[].id", type: "string", description: "Row identifier: the document result UUID and the field key joined by a colon." },
|
|
19306
|
+
{ name: "data[].result_id", type: "string", description: "UUID of the per-document result row this field belongs to." },
|
|
19305
19307
|
{ name: "data[].resolution_run_id", type: "string", description: "Parent resolution run UUID." },
|
|
19306
19308
|
{ name: "data[].document_id", type: "string", description: "Document UUID this result belongs to." },
|
|
19307
|
-
{ name: "data[].
|
|
19308
|
-
{ name: "data[].
|
|
19309
|
-
{ name: "data[].
|
|
19310
|
-
{ name: "data[].
|
|
19309
|
+
{ name: "data[].status", type: "string", description: "The document result's status: pending, processing, completed, or failed." },
|
|
19310
|
+
{ name: "data[].field_name", type: "string", description: "Field key that was resolved." },
|
|
19311
|
+
{ name: "data[].original_value", type: "any | null", description: "Raw extracted value before resolution." },
|
|
19312
|
+
{ name: "data[].resolved_value", type: "any | null", description: "Canonical value after resolution." },
|
|
19313
|
+
{ name: "data[].resolution_step", type: "string | null", description: "Strategy that produced the resolved value (for example lookup, registry_transfer, deterministic_compute, source_extraction), or null." },
|
|
19311
19314
|
{ name: "data[].confidence", type: "number | null", description: "Confidence score for the resolved value (0-1), or null when not applicable." },
|
|
19312
19315
|
{ name: "data[].created_at", type: "string", description: "ISO 8601 timestamp." }
|
|
19313
19316
|
]
|
|
@@ -19318,9 +19321,11 @@ var sections32 = [
|
|
|
19318
19321
|
code: `{
|
|
19319
19322
|
"data": [
|
|
19320
19323
|
{
|
|
19321
|
-
"id": "c3d4e5f6-a7b8-9012-cdef-123456789012",
|
|
19324
|
+
"id": "c3d4e5f6-a7b8-9012-cdef-123456789012:country",
|
|
19325
|
+
"result_id": "c3d4e5f6-a7b8-9012-cdef-123456789012",
|
|
19322
19326
|
"resolution_run_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
|
|
19323
19327
|
"document_id": "d4e5f6a7-b8c9-0123-defa-234567890123",
|
|
19328
|
+
"status": "completed",
|
|
19324
19329
|
"field_name": "country",
|
|
19325
19330
|
"original_value": "Deutschland",
|
|
19326
19331
|
"resolved_value": "DE",
|
|
@@ -19331,7 +19336,7 @@ var sections32 = [
|
|
|
19331
19336
|
]
|
|
19332
19337
|
}`
|
|
19333
19338
|
},
|
|
19334
|
-
{ type: "paragraph", text: "Use `resolution_step` to understand how each value was normalized: `lookup` indicates a direct reference table match, `
|
|
19339
|
+
{ type: "paragraph", text: "Use `resolution_step` to understand how each value was normalized: `lookup` indicates a direct reference table match, `registry_transfer` means the value was carried from the field registry, `deterministic_compute` means a formula produced the result, and `source_extraction` means the extracted value stood as-is. A `null` `resolved_value` means no strategy produced a value for the field. Recurring unmatched values are the signal to extend your reference tables before the next run." },
|
|
19335
19340
|
{ type: "paragraph", text: "Read results only after [`GET /v1/resolutions/{id}`](get-resolution) reports `completed` when you need the final picture \u2014 during `processing` the endpoint serves whatever has been flushed so far, which is useful for progress display but not for downstream consumption. For delivery-shaped output (dialect renames, suppressed fields, casts applied), configure the run's schema with a dialect and consume the run through your delivery destinations instead of re-implementing that shaping client-side." },
|
|
19336
19341
|
{ type: "heading", level: 2, id: "get-resolution-results-errors", text: "Errors" },
|
|
19337
19342
|
{
|
|
@@ -19353,7 +19358,7 @@ var sections32 = [
|
|
|
19353
19358
|
],
|
|
19354
19359
|
faq: [
|
|
19355
19360
|
{ question: "What does it mean when resolved_value is null?", answer: "No resolution strategy could match the original value to a canonical form, so the field keeps its raw extracted value. Recurring unmatched values are the signal to add entries to your reference tables \u2014 the next run created after the edit picks them up." },
|
|
19356
|
-
{ question: "Why does the endpoint return rows before the run is completed?", answer: "
|
|
19361
|
+
{ question: "Why does the endpoint return rows before the run is completed?", answer: "Per-document results are flushed in batches during execution, and each flushed document contributes one row per field. Partial reads are useful for progress display; wait for the run status to reach completed before consuming results downstream." },
|
|
19357
19362
|
{ question: "Why do I see fewer rows than the source run has documents?", answer: "Results are filtered by your organization's source visibility rules: rows for documents hidden from your API key's user are dropped from the response. A key minted by a user with broader visibility can see more rows for the same run." },
|
|
19358
19363
|
{ question: "Can I use resolution results in a data product?", answer: "Yes. Pass the completed resolution run's UUID in the run_ids array of POST /v1/data-products to assemble the resolved values into a data product ready for export or delivery." }
|
|
19359
19364
|
],
|
|
@@ -23362,7 +23367,7 @@ var sections38 = [
|
|
|
23362
23367
|
{ type: "paragraph", text: "This namespace is **Benchmarks** (the `/v1/validation` namespace): measuring how accurately a completed job run extracted data, by comparing its output against manually verified expected values. It is not the in-pipeline validation checks (see the Structuring API) that gate individual results before delivery \u2014 those keep the Validation name. `GET /v1/validation/ground-truth` lists the **golden samples** those accuracy measurements run against." },
|
|
23363
23368
|
{ type: "paragraph", text: "A **golden sample** (shown as Ground Truth in the platform) is a curated set of verified document-field value pairs: each entry names a `document_id`, a `field_name`, and the `expected_value` a correct extraction should produce. Every golden sample is bound to exactly one schema via `user_schema_id` \u2014 the schema whose fields the expected values describe \u2014 so a validation run always compares like with like. API payloads reference a dataset through the `golden_sample_id` field." },
|
|
23364
23369
|
{ type: "paragraph", text: "Do not confuse golden samples with the benchmark datasets under [`/v1/quality/ground-truth`](list-quality-datasets). Both store verified values, but a `/v1/quality` dataset holds one `expected_data` object per document and feeds repeatable benchmark runs, while a golden sample holds individual per-field expected values and scores **one specific Structuring Run** (a job run) via `POST /v1/validation/runs`." },
|
|
23365
|
-
{ type: "paragraph", text: "The list returns every golden sample in your organization, newest first, in a single response \u2014 there are no pagination parameters on this endpoint.
|
|
23370
|
+
{ type: "paragraph", text: "The list returns every golden sample in your organization, newest first, in a single response \u2014 there are no pagination parameters on this endpoint. `entry_count` is the number of expected values stored on the sample (one per document-field pair). Golden samples are curated in the Talonic platform (Review → Benchmarks); through the public API you list them, inspect their expected values, delete them, and run benchmarks against them." },
|
|
23366
23371
|
{ type: "paragraph", text: "A typical integration lists datasets, picks the one matching the schema of the Structuring Run it wants to score, then passes its `id` as `golden_sample_id` to [`POST /v1/validation/runs`](create-validation-run). Because each dataset is schema-bound, filter client-side on `user_schema_id` to find the dataset that matches the run you are validating." },
|
|
23367
23372
|
{ type: "callout", variant: "info", text: "Golden samples are reusable. Curate a dataset once and benchmark against it repeatedly as you refine your schemas and extraction pipeline \u2014 each validation run references the dataset, it never consumes it." },
|
|
23368
23373
|
{
|
|
@@ -23447,7 +23452,7 @@ var sections38 = [
|
|
|
23447
23452
|
content: [
|
|
23448
23453
|
{ type: "paragraph", text: "`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." },
|
|
23449
23454
|
{ type: "paragraph", text: "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 \u2014 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." },
|
|
23450
|
-
{ type: "paragraph", text: "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)
|
|
23455
|
+
{ type: "paragraph", text: "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." },
|
|
23451
23456
|
{ type: "paragraph", text: "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." },
|
|
23452
23457
|
{ type: "callout", variant: "warning", text: "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 \u2014 capture any accuracy history you need before calling it." },
|
|
23453
23458
|
{
|
|
@@ -23549,8 +23554,8 @@ var sections38 = [
|
|
|
23549
23554
|
description: "List validation runs with GET /v1/validation/runs. Each run scores a job run against a golden sample dataset; poll status and drill into per-field results.",
|
|
23550
23555
|
content: [
|
|
23551
23556
|
{ type: "paragraph", text: "A **validation run** is a benchmark: it compares the structured output of one job run (a **Structuring Run** in the platform) against a golden sample dataset and produces per-field comparison records. `GET /v1/validation/runs` lists the newest 100 validation runs for your organization, most recent first. This is Benchmarks \u2014 accuracy measurement after the fact \u2014 not the in-pipeline validation checks that gate results before delivery." },
|
|
23552
|
-
{ type: "paragraph", text: "Each run carries a `status` from the lifecycle `pending` → `queued` → `processing` → `completed` (or `failed`). Runs created through the public API
|
|
23553
|
-
{ type: "paragraph", text:
|
|
23557
|
+
{ type: "paragraph", text: "Each run carries a `status` from the lifecycle `pending` → `queued` → `processing` → `completed` (or `failed`). Runs created through the public API execute in the request and come back already `completed` or `failed`; only runs created from older clients can still sit in `pending`. There is no `running` status." },
|
|
23558
|
+
{ type: "paragraph", text: "`accuracy` is the run's weighted score across all fields and documents (0-1) and `total_comparisons` is the number of document-field pairs compared; both are `null` until the run completes. `field_accuracy` carries the per-field breakdown (match-type counts and a per-field score), and `matched_documents` / `unmatched_golden` / `unmatched_dataset` show how many documents were paired. For row-level detail, fetch [`GET /v1/validation/runs/{id}/results`](get-validation-results)." },
|
|
23554
23559
|
{ type: "paragraph", text: "The list includes every validation run in the organization, not only API-created ones: benchmarks launched from the platform (golden-sample comparisons, CSV comparisons, unified and LLM-judge runs) appear here too, serialized to the same shape. Use `dataspace_run_id` to correlate a run with the job it scored and `golden_sample_id` to correlate it with its dataset; both come back `null` on run types that do not use them (a CSV comparison has no job run, for example)." },
|
|
23555
23560
|
{ type: "callout", variant: "info", text: "The list returns up to 100 runs ordered by `created_at` descending, with no pagination. Delete obsolete runs with `DELETE /v1/validation/runs/{id}` if older runs you still need fall outside the window." },
|
|
23556
23561
|
{
|
|
@@ -23579,8 +23584,13 @@ var sections38 = [
|
|
|
23579
23584
|
{ name: "data[].status", type: "string", description: "Run status: pending, queued, processing, completed, or failed." },
|
|
23580
23585
|
{ name: "data[].dataspace_run_id", type: "string | null", description: "UUID of the job run (Structuring Run) being validated." },
|
|
23581
23586
|
{ name: "data[].golden_sample_id", type: "string | null", description: "UUID of the golden sample dataset." },
|
|
23582
|
-
{ name: "data[].accuracy", type: "null", description: "
|
|
23583
|
-
{ name: "data[].total_comparisons", type: "null", description: "
|
|
23587
|
+
{ name: "data[].accuracy", type: "number | null", description: "Weighted accuracy across all fields and documents (0-1). Null until the run completes." },
|
|
23588
|
+
{ name: "data[].total_comparisons", type: "integer | null", description: "Number of document-field pairs compared. Null until the run completes." },
|
|
23589
|
+
{ name: "data[].matched_documents", type: "integer", description: "Documents paired between the job run and the golden sample." },
|
|
23590
|
+
{ name: "data[].unmatched_golden", type: "integer", description: "Golden sample documents with no corresponding job-run document." },
|
|
23591
|
+
{ name: "data[].unmatched_dataset", type: "integer", description: "Job-run documents with no corresponding golden sample document." },
|
|
23592
|
+
{ name: "data[].field_accuracy", type: "object | null", description: "Per-field breakdown: total, exact, partial, mismatch, missing_actual, missing_expected, both_empty, accuracy." },
|
|
23593
|
+
{ name: "data[].error_message", type: "string | null", description: "Why a failed run failed." },
|
|
23584
23594
|
{ name: "data[].created_at", type: "string", description: "ISO 8601 creation timestamp." },
|
|
23585
23595
|
{ name: "data[].completed_at", type: "string | null", description: "ISO 8601 completion timestamp." },
|
|
23586
23596
|
{ name: "data[].links", type: "object", description: "Related resource URLs (self, results)." }
|
|
@@ -23597,8 +23607,13 @@ var sections38 = [
|
|
|
23597
23607
|
"status": "completed",
|
|
23598
23608
|
"dataspace_run_id": "b2c3d4e5-f6a7-8901-bcde-f12345678901",
|
|
23599
23609
|
"golden_sample_id": "c3d4e5f6-a7b8-9012-cdef-123456789012",
|
|
23600
|
-
"accuracy":
|
|
23601
|
-
"total_comparisons":
|
|
23610
|
+
"accuracy": 0.9412,
|
|
23611
|
+
"total_comparisons": 68,
|
|
23612
|
+
"matched_documents": 17,
|
|
23613
|
+
"unmatched_golden": 0,
|
|
23614
|
+
"unmatched_dataset": 2,
|
|
23615
|
+
"field_accuracy": { "invoice_number": { "total": 17, "exact": 17, "partial": 0, "mismatch": 0, "missing_actual": 0, "missing_expected": 0, "both_empty": 0, "accuracy": 1 } },
|
|
23616
|
+
"error_message": null,
|
|
23602
23617
|
"created_at": "2024-09-14T10:32:00.000Z",
|
|
23603
23618
|
"completed_at": "2024-09-14T10:35:00.000Z",
|
|
23604
23619
|
"links": {
|
|
@@ -23626,9 +23641,9 @@ var sections38 = [
|
|
|
23626
23641
|
],
|
|
23627
23642
|
faq: [
|
|
23628
23643
|
{ question: "How many validation runs are returned?", answer: "Up to 100 runs are returned, ordered by created_at descending, in a single response without pagination. Older runs beyond the newest 100 are not listed." },
|
|
23629
|
-
{ question: "Why is accuracy
|
|
23644
|
+
{ question: "Why is accuracy null on a run?", answer: "The run has not completed. accuracy and total_comparisons are filled in when the comparison finishes; a failed run keeps them null and explains itself in error_message." },
|
|
23630
23645
|
{ question: "What is dataspace_run_id in the response?", answer: "It is the UUID of the job run (Structuring Run) whose output was validated. golden_sample_id identifies the golden sample dataset the output was compared against." },
|
|
23631
|
-
{ question: "What statuses can a validation run have?", answer: "pending
|
|
23646
|
+
{ question: "What statuses can a validation run have?", answer: "pending, queued and processing while the engine is comparing, then completed or failed. Runs created through the public API execute in the request and return already completed or failed; there is no running status." },
|
|
23632
23647
|
{ question: "Can I filter the run list by job or dataset?", answer: "No \u2014 the endpoint takes no query parameters. Fetch the newest 100 runs and filter client-side on dataspace_run_id or golden_sample_id. If runs you need regularly fall outside the 100-run window, delete superseded runs to keep the window useful." }
|
|
23633
23648
|
],
|
|
23634
23649
|
mentions: ["validation runs", "accuracy tracking", "golden_sample_id", "dataspace_run_id", "run status", "Structuring Run"]
|
|
@@ -23641,10 +23656,10 @@ var sections38 = [
|
|
|
23641
23656
|
description: "Start a validation run with POST /v1/validation/runs, registering a benchmark of one job run against a golden sample for per-field extraction accuracy.",
|
|
23642
23657
|
content: [
|
|
23643
23658
|
{ type: "paragraph", text: "`POST /v1/validation/runs` registers a **validation run**: a benchmark that compares the output of one **job run** (Structuring Run) against a **golden sample** of verified expected values. When the run executes, the engine classifies every document-field pair as `exact`, `partial`, or `mismatch` (plus missing-value categories), and an optional LLM judge pass adds semantic verdicts. This measures accuracy after extraction, unlike the in-pipeline checks that gate results before delivery." },
|
|
23644
|
-
{ type: "paragraph", text: 'The endpoint validates both references before inserting: `dataspace_run_id` is checked first (404 `"Job run ... not found."`), then `golden_sample_id` (404 `"Golden sample ... not found."`); both must be UUID v4 or the request fails with `400 VALIDATION_ERROR`. On success the run is
|
|
23645
|
-
{ type: "paragraph", text: "
|
|
23659
|
+
{ type: "paragraph", text: 'The endpoint validates both references before inserting: `dataspace_run_id` is checked first (404 `"Job run ... not found."`), then `golden_sample_id` (404 `"Golden sample ... not found."`); both must be UUID v4 or the request fails with `400 VALIDATION_ERROR`. The job run must be `completed` (a 400 `validation_error` otherwise) and must use the same schema as the golden sample. On success the comparison runs in the request and the run is returned already `completed`, with `accuracy`, `total_comparisons` and `field_accuracy` populated; if the engine hits an error the run is returned as `failed` with `error_message`.' },
|
|
23660
|
+
{ type: "paragraph", text: "This is the same engine the platform's Benchmarks surface (Review → Benchmarks) runs, so scores from the API and the dashboard agree. A golden sample with a few hundred values compares in well under a second; the request returns when the comparison is done, so there is nothing to poll." },
|
|
23646
23661
|
{ type: "paragraph", text: "For a meaningful benchmark, validate a **completed** Structuring Run whose schema matches the golden sample's `user_schema_id` \u2014 the engine compares field names defined by that schema, so a schema mismatch produces mostly missing comparisons rather than an error at creation time. If `name` is omitted, the run is named `Validation YYYY-MM-DD` from the creation date; use explicit names when creating several runs a day, since the list endpoint has no filters." },
|
|
23647
|
-
{ type: "callout", variant: "
|
|
23662
|
+
{ type: "callout", variant: "info", text: "Runs are cheap and independent. Create one per job run you want scored and compare them over time with [`GET /v1/validation/runs`](list-validation-runs)." },
|
|
23648
23663
|
{
|
|
23649
23664
|
type: "endpoint",
|
|
23650
23665
|
method: "POST",
|
|
@@ -23692,11 +23707,13 @@ var sections38 = [
|
|
|
23692
23707
|
params: [
|
|
23693
23708
|
{ name: "id", type: "string", description: "Validation run UUID." },
|
|
23694
23709
|
{ name: "name", type: "string", description: "Run name." },
|
|
23695
|
-
{ name: "status", type: "string", description: "
|
|
23710
|
+
{ name: "status", type: "string", description: "completed, or failed when the engine hit an error (see error_message)." },
|
|
23696
23711
|
{ name: "dataspace_run_id", type: "string", description: "UUID of the job run being validated." },
|
|
23697
23712
|
{ name: "golden_sample_id", type: "string", description: "UUID of the golden sample dataset." },
|
|
23698
|
-
{ name: "accuracy", type: "null", description: "
|
|
23699
|
-
{ name: "total_comparisons", type: "null", description: "
|
|
23713
|
+
{ name: "accuracy", type: "number | null", description: "Weighted accuracy across all fields and documents (0-1); null on a failed run." },
|
|
23714
|
+
{ name: "total_comparisons", type: "integer | null", description: "Number of document-field pairs compared; null on a failed run." },
|
|
23715
|
+
{ name: "field_accuracy", type: "object | null", description: "Per-field breakdown with match-type counts and a per-field score." },
|
|
23716
|
+
{ name: "error_message", type: "string | null", description: "Why a failed run failed." },
|
|
23700
23717
|
{ name: "created_at", type: "string", description: "ISO 8601 creation timestamp." },
|
|
23701
23718
|
{ name: "completed_at", type: "string | null", description: "Null until the run completes." },
|
|
23702
23719
|
{ name: "links", type: "object", description: "Related resource URLs (self, results)." }
|
|
@@ -23708,13 +23725,18 @@ var sections38 = [
|
|
|
23708
23725
|
code: `{
|
|
23709
23726
|
"id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
|
|
23710
23727
|
"name": "Q1 Invoice accuracy check",
|
|
23711
|
-
"status": "
|
|
23728
|
+
"status": "completed",
|
|
23712
23729
|
"dataspace_run_id": "b2c3d4e5-f6a7-8901-bcde-f12345678901",
|
|
23713
23730
|
"golden_sample_id": "c3d4e5f6-a7b8-9012-cdef-123456789012",
|
|
23714
|
-
"accuracy":
|
|
23715
|
-
"total_comparisons":
|
|
23731
|
+
"accuracy": 0.9412,
|
|
23732
|
+
"total_comparisons": 68,
|
|
23733
|
+
"matched_documents": 17,
|
|
23734
|
+
"unmatched_golden": 0,
|
|
23735
|
+
"unmatched_dataset": 2,
|
|
23736
|
+
"field_accuracy": { "invoice_number": { "total": 17, "exact": 17, "partial": 0, "mismatch": 0, "missing_actual": 0, "missing_expected": 0, "both_empty": 0, "accuracy": 1 } },
|
|
23737
|
+
"error_message": null,
|
|
23716
23738
|
"created_at": "2024-09-14T10:32:00.000Z",
|
|
23717
|
-
"completed_at":
|
|
23739
|
+
"completed_at": "2024-09-14T10:32:01.000Z",
|
|
23718
23740
|
"links": {
|
|
23719
23741
|
"self": "/v1/validation/runs/a1b2c3d4-e5f6-7890-abcd-ef1234567890",
|
|
23720
23742
|
"results": "/v1/validation/runs/a1b2c3d4-e5f6-7890-abcd-ef1234567890/results"
|
|
@@ -23739,7 +23761,7 @@ var sections38 = [
|
|
|
23739
23761
|
{ label: "Get Job Results", slug: "get-job-results" }
|
|
23740
23762
|
],
|
|
23741
23763
|
faq: [
|
|
23742
|
-
{ question: "
|
|
23764
|
+
{ question: "Does the POST wait for the comparison?", answer: "Yes. The comparison runs inside the request and the response is the finished run (completed, or failed with error_message). There is no pending phase to poll through." },
|
|
23743
23765
|
{ question: "Can I run validation against the same dataset multiple times?", answer: "Yes. You can create multiple validation runs against the same golden sample with different job runs to track accuracy improvements over time. Runs reference the dataset without consuming it." },
|
|
23744
23766
|
{ question: "What is the difference between a validation run and a benchmark run?", answer: "Both are Benchmarks surfaces. A validation run (POST /v1/validation/runs) scores one specific job run against a golden sample of per-field expected values. A benchmark run (POST /v1/quality/benchmarks) scores extraction output against a dataset of per-document expected_data objects and supports run-to-run comparison." }
|
|
23745
23767
|
],
|
|
@@ -23753,8 +23775,8 @@ var sections38 = [
|
|
|
23753
23775
|
description: "Poll a validation run for status with GET /v1/validation/runs/:id, or delete the run and its per-field results with DELETE on the same authenticated path.",
|
|
23754
23776
|
content: [
|
|
23755
23777
|
{ type: "paragraph", text: "`GET /v1/validation/runs/{id}` retrieves one **validation run** with its status and metadata; `DELETE` on the same path permanently removes the run and its per-field results. A validation run is a benchmark of a job run against a golden sample, so this endpoint is where you poll until benchmarking finishes and the per-field results are ready to read." },
|
|
23756
|
-
{ type: "paragraph", text:
|
|
23757
|
-
{ type: "paragraph", text:
|
|
23778
|
+
{ type: "paragraph", text: "After a run is created, poll this endpoint until the `status` field reaches a terminal state: the lifecycle is `pending` → `queued` → `processing` → `completed` or `failed`. Runs created through the public API return already `completed` or `failed`, so polling is only needed for runs launched elsewhere." },
|
|
23779
|
+
{ type: "paragraph", text: "Once `status` is `completed`, `accuracy` (0-1, weighted across all fields and documents), `total_comparisons` and the per-field `field_accuracy` breakdown are populated. Follow `links.results` to [the per-field results](get-validation-results) when you need row-level detail \u2014 for example to list every `mismatch` for one field." },
|
|
23758
23780
|
{ type: "callout", variant: "warning", text: "Deleting a validation run permanently removes all per-field results. The golden sample dataset and the original job run are not affected. Use DELETE only when you want to clean up outdated or erroneous runs." },
|
|
23759
23781
|
{ type: "paragraph", text: "Pair this endpoint with **Create Validation Run** for the register-then-poll workflow, or with **List Validation Runs** to find specific runs by recency. Because the list endpoint returns only the newest 100 runs, deleting superseded runs here also keeps your full history reachable through the list." },
|
|
23760
23782
|
{ type: "paragraph", text: 'The run object doubles as an audit record: `created_at` and `completed_at` bound when the benchmark ran, `dataspace_run_id` ties the score to the exact Structuring Run that produced the output, and `golden_sample_id` ties it to the exact reference dataset. Store the run `id` alongside your own release or deployment records so a later accuracy question ("what did we measure before the schema change?") resolves to one GET instead of an archaeology session.' },
|
|
@@ -23783,8 +23805,13 @@ var sections38 = [
|
|
|
23783
23805
|
{ name: "status", type: "string", description: "Run status: pending, queued, processing, completed, or failed." },
|
|
23784
23806
|
{ name: "dataspace_run_id", type: "string | null", description: "UUID of the job run being validated." },
|
|
23785
23807
|
{ name: "golden_sample_id", type: "string | null", description: "UUID of the golden sample dataset." },
|
|
23786
|
-
{ name: "accuracy", type: "null", description: "
|
|
23787
|
-
{ name: "total_comparisons", type: "null", description: "
|
|
23808
|
+
{ name: "accuracy", type: "number | null", description: "Weighted accuracy across all fields and documents (0-1). Null until the run completes." },
|
|
23809
|
+
{ name: "total_comparisons", type: "integer | null", description: "Number of document-field pairs compared. Null until the run completes." },
|
|
23810
|
+
{ name: "matched_documents", type: "integer", description: "Documents paired between the job run and the golden sample." },
|
|
23811
|
+
{ name: "unmatched_golden", type: "integer", description: "Golden sample documents with no corresponding job-run document." },
|
|
23812
|
+
{ name: "unmatched_dataset", type: "integer", description: "Job-run documents with no corresponding golden sample document." },
|
|
23813
|
+
{ name: "field_accuracy", type: "object | null", description: "Per-field breakdown: total, exact, partial, mismatch, missing_actual, missing_expected, both_empty, accuracy." },
|
|
23814
|
+
{ name: "error_message", type: "string | null", description: "Why a failed run failed." },
|
|
23788
23815
|
{ name: "created_at", type: "string", description: "ISO 8601 creation timestamp." },
|
|
23789
23816
|
{ name: "completed_at", type: "string | null", description: "ISO 8601 completion timestamp." },
|
|
23790
23817
|
{ name: "links", type: "object", description: "Related resource URLs (self, results)." }
|
|
@@ -23799,8 +23826,13 @@ var sections38 = [
|
|
|
23799
23826
|
"status": "completed",
|
|
23800
23827
|
"dataspace_run_id": "b2c3d4e5-f6a7-8901-bcde-f12345678901",
|
|
23801
23828
|
"golden_sample_id": "c3d4e5f6-a7b8-9012-cdef-123456789012",
|
|
23802
|
-
"accuracy":
|
|
23803
|
-
"total_comparisons":
|
|
23829
|
+
"accuracy": 0.9412,
|
|
23830
|
+
"total_comparisons": 68,
|
|
23831
|
+
"matched_documents": 17,
|
|
23832
|
+
"unmatched_golden": 0,
|
|
23833
|
+
"unmatched_dataset": 2,
|
|
23834
|
+
"field_accuracy": { "invoice_number": { "total": 17, "exact": 17, "partial": 0, "mismatch": 0, "missing_actual": 0, "missing_expected": 0, "both_empty": 0, "accuracy": 1 } },
|
|
23835
|
+
"error_message": null,
|
|
23804
23836
|
"created_at": "2024-09-14T10:32:00.000Z",
|
|
23805
23837
|
"completed_at": "2024-09-14T10:35:00.000Z",
|
|
23806
23838
|
"links": {
|
|
@@ -23834,8 +23866,8 @@ var sections38 = [
|
|
|
23834
23866
|
],
|
|
23835
23867
|
faq: [
|
|
23836
23868
|
{ question: "Does deleting a validation run delete the golden sample?", answer: "No. Deleting a run only removes the run record and its per-field results. The golden sample dataset and the job run remain intact. (The reverse is not true: deleting a golden sample cascades to its runs.)" },
|
|
23837
|
-
{ question: "How do I poll for run completion?", answer: "
|
|
23838
|
-
{ question: "How do I get the accuracy score for a completed run?", answer: "
|
|
23869
|
+
{ question: "How do I poll for run completion?", answer: "Runs created through the API return already completed or failed, so no polling is needed. For a run launched elsewhere, call GET /v1/validation/runs/{id} until status reaches completed or failed." },
|
|
23870
|
+
{ question: "How do I get the accuracy score for a completed run?", answer: "Read accuracy (0-1, weighted across all fields and documents) and field_accuracy on the run object. Fetch links.results when you need the per-field rows behind those numbers." },
|
|
23839
23871
|
{ question: "What does a failed status mean?", answer: "The engine hit an error while executing the comparison \u2014 for example the job run's output could not be loaded. The run keeps its failed status permanently; register a new run to retry rather than expecting the failed one to re-execute." }
|
|
23840
23872
|
],
|
|
23841
23873
|
mentions: ["validation run detail", "run status polling", "accuracy score", "per-field results", "DELETE validation run"]
|
|
@@ -30982,7 +31014,7 @@ var sections48 = [
|
|
|
30982
31014
|
{ type: "paragraph", text: "The typical workflow is: extract a set of representative documents, manually verify the correct value for each schema field, then POST one entry per document. When a benchmark runs, it compares the extracted value for each field against the matching key in `expected_data` and reports per-field accuracy. Fetch candidate document ids from [`GET /v1/documents`](list-documents) \u2014 `document_id` must be an existing document in your workspace, not an arbitrary identifier." },
|
|
30983
31015
|
{ type: "paragraph", text: "`expected_data` is deliberately free-form JSON: any shape is accepted at write time, so you can store nested structures or extra keys for your own bookkeeping. Only keys that match your schema's field names participate in benchmark comparison; everything else is carried along untouched. `notes` is a free-text field for reviewer context \u2014 ambiguities, edge cases, or why a particular value was chosen \u2014 and is returned verbatim on every read." },
|
|
30984
31016
|
{ type: "paragraph", text: "The entries list is returned in full, oldest-first, with no pagination parameters \u2014 datasets are expected to hold tens to low hundreds of entries, not millions. Reads are filtered by document visibility: entries whose documents are hidden from your API key's minting user by source IAM rules are omitted. Writes require the `write` scope; the dataset itself is always tenant-checked first, so a foreign `datasetId` returns `404` before any entry is touched." },
|
|
30985
|
-
{ type: "callout", variant: "
|
|
31017
|
+
{ type: "callout", variant: "info", text: '`document_id` must reference a document in your workspace that is visible to your API key\'s minting user. An unknown, foreign, or hidden id is rejected with `404 not_found` ("Document ... not found") before anything is written \u2014 resolve ids from `GET /v1/documents`.' },
|
|
30986
31018
|
{ type: "callout", variant: "info", text: "Each entry maps a `document_id` to an `expected_data` object containing the verified field values. Field keys in `expected_data` should match the field names used in your extraction schema for accurate benchmark comparisons." },
|
|
30987
31019
|
{
|
|
30988
31020
|
type: "endpoint",
|
|
@@ -31139,7 +31171,7 @@ var sections48 = [
|
|
|
31139
31171
|
{ type: "paragraph", text: "Use this endpoint to see all benchmark runs and their accuracy scores. A typical workflow is to list benchmarks after making schema or extraction changes, then compare the latest run against previous ones using `GET /v1/quality/benchmarks/compare` to measure improvement or detect regressions." },
|
|
31140
31172
|
{ type: "paragraph", text: "Each benchmark includes `status` (`queued`, `running`, or `complete` \u2014 note the terminal value is `complete`, not `completed`), `accuracy_overall` (0-1 score, null until the run finishes), `accuracy_by_field` (per-field breakdown), and `documents_processed`/`documents_total` for progress tracking. `accuracy_delta` and `compared_to_run_id` are populated only when a run was started with a comparison target in the platform; for ad-hoc deltas use the compare endpoint." },
|
|
31141
31173
|
{ type: "paragraph", text: "Run benchmarks regularly after extraction changes. Pair with `GET /v1/quality/benchmarks/:id/results` for per-document drill-down showing which fields matched and which diverged. Use the compare endpoint to track accuracy trends across multiple runs." },
|
|
31142
|
-
{ type: "callout", variant: "info", text: "Accuracy fields (`accuracy_overall`, `accuracy_by_field`) stay null while a run is `queued` or `running`. Poll `GET /v1/quality/benchmarks/:id` and read the scores once `status` reaches `complete`. Runs created through the API
|
|
31174
|
+
{ type: "callout", variant: "info", text: "Accuracy fields (`accuracy_overall`, `accuracy_by_field`) stay null while a run is `queued` or `running`. Poll `GET /v1/quality/benchmarks/:id` and read the scores once `status` reaches `complete`. Runs created through the API execute in the request and come back `complete`." },
|
|
31143
31175
|
{
|
|
31144
31176
|
type: "endpoint",
|
|
31145
31177
|
method: "GET",
|
|
@@ -31175,7 +31207,7 @@ var sections48 = [
|
|
|
31175
31207
|
{ name: "data[].name", type: "string", description: "Benchmark run name." },
|
|
31176
31208
|
{ name: "data[].dataset_id", type: "string", description: "Ground truth dataset ID used for this run." },
|
|
31177
31209
|
{ name: "data[].user_schema_id", type: "string | null", description: "User schema scoping this benchmark, if any." },
|
|
31178
|
-
{ name: "data[].status", type: "string", description: "Run status: queued
|
|
31210
|
+
{ name: "data[].status", type: "string", description: "Run status: queued, running, or complete. Runs created through the API return already complete." },
|
|
31179
31211
|
{ name: "data[].accuracy_overall", type: "number | null", description: "Overall accuracy score (0\u20131). Null while running." },
|
|
31180
31212
|
{ name: "data[].accuracy_by_field", type: "object | null", description: "Per-field accuracy scores. Null while running." },
|
|
31181
31213
|
{ name: "data[].documents_processed", type: "integer", description: "Number of documents evaluated so far." },
|
|
@@ -31245,8 +31277,8 @@ var sections48 = [
|
|
|
31245
31277
|
{ label: "List Benchmark Datasets", slug: "list-quality-datasets" }
|
|
31246
31278
|
],
|
|
31247
31279
|
faq: [
|
|
31248
|
-
{ question: "What benchmark statuses are possible?", answer: "
|
|
31249
|
-
{ question: "Why is accuracy_overall null?", answer: "Accuracy scores are only computed when the benchmark run finishes. While the status is queued or running, accuracy fields are null
|
|
31280
|
+
{ question: "What benchmark statuses are possible?", answer: "queued, running, and complete (note: complete, not completed). Runs created through the API execute in the request and are returned already complete. Match on the exact string when polling runs launched elsewhere." },
|
|
31281
|
+
{ question: "Why is accuracy_overall null?", answer: "Accuracy scores are only computed when the benchmark run finishes. While the status is queued or running, accuracy fields are null." },
|
|
31250
31282
|
{ question: "How do I track the progress of a running benchmark?", answer: "Poll GET /v1/quality/benchmarks/:id and compare documents_processed against documents_total. Once status reaches complete, duration_ms records the total evaluation time and the accuracy fields are populated." },
|
|
31251
31283
|
{ question: "How do I compare two benchmark runs?", answer: "Call `GET /v1/quality/benchmarks/compare?run_a=<id>&run_b=<id>`. The response returns both runs side by side plus an `accuracy_delta` (run_a minus run_b) so you can quantify improvement or regression between runs." }
|
|
31252
31284
|
],
|
|
@@ -31260,11 +31292,11 @@ var sections48 = [
|
|
|
31260
31292
|
description: "Start a benchmark run with POST /v1/quality/benchmarks to score extraction output against a ground truth dataset. Returns per-field and overall accuracy.",
|
|
31261
31293
|
content: [
|
|
31262
31294
|
{ type: "paragraph", text: "`POST /v1/quality/benchmarks` starts a **benchmark run** that evaluates your current extraction output against a ground truth dataset. The benchmark compares each document in the dataset entry-by-entry and field-by-field, producing an overall accuracy score and per-field breakdowns." },
|
|
31263
|
-
{ type: "paragraph", text: "The typical workflow is: create a benchmark after making extraction changes,
|
|
31264
|
-
{ type: "paragraph", text: "The response
|
|
31295
|
+
{ type: "paragraph", text: "The typical workflow is: create a benchmark after making extraction changes, read the scores off the response, then drill into per-document results. Run multiple benchmarks against the same dataset over time to track accuracy trends." },
|
|
31296
|
+
{ type: "paragraph", text: "The evaluation runs inside the request. The response is the finished benchmark: `status: complete`, `accuracy_overall` and `accuracy_by_field` populated, `documents_processed` equal to `documents_total` (the dataset's entry count), and `duration_ms` recording the evaluation time. A 50-entry dataset typically finishes in a few seconds." },
|
|
31265
31297
|
{ type: "paragraph", text: "A benchmark does not re-extract anything: at execution the engine takes each dataset entry, finds the **latest completed extraction result** for that document under the given `user_schema_id`, and compares the extracted values field-by-field against `expected_data`. Entries whose documents have no completed result for that schema simply cannot match \u2014 run your extraction (Spec pipeline or Structuring Run) over the benchmark documents before benchmarking, or accuracy will understate real quality." },
|
|
31266
31298
|
{ type: "paragraph", text: "Multiple benchmarks can run in parallel against different datasets. Use `GET /v1/quality/benchmarks/compare` after completion to compare two runs side by side. The `dataset_id` is fixed at creation \u2014 to benchmark against a different dataset, create a new run." },
|
|
31267
|
-
{ type: "callout", variant: "
|
|
31299
|
+
{ type: "callout", variant: "info", text: "This is the same engine the platform's Benchmarks surface runs, so API and dashboard scores agree. Because the evaluation happens in the request, a large dataset means a longer request; keep your HTTP client timeout generous for datasets in the hundreds of entries." },
|
|
31268
31300
|
{
|
|
31269
31301
|
type: "endpoint",
|
|
31270
31302
|
method: "POST",
|
|
@@ -31305,12 +31337,14 @@ var sections48 = [
|
|
|
31305
31337
|
{ name: "name", type: "string", description: "Benchmark run name." },
|
|
31306
31338
|
{ name: "dataset_id", type: "string", description: "Ground truth dataset ID." },
|
|
31307
31339
|
{ name: "user_schema_id", type: "string", description: "User schema whose fields are evaluated." },
|
|
31308
|
-
{ name: "status", type: "string", description: "
|
|
31309
|
-
{ name: "accuracy_overall", type: "
|
|
31310
|
-
{ name: "
|
|
31311
|
-
{ name: "
|
|
31340
|
+
{ name: "status", type: "string", description: "complete \u2014 the evaluation ran inside the request." },
|
|
31341
|
+
{ name: "accuracy_overall", type: "number", description: "Overall accuracy (0-1) across every expected field." },
|
|
31342
|
+
{ name: "accuracy_by_field", type: "object", description: "Per-field accuracy (0-1)." },
|
|
31343
|
+
{ name: "documents_processed", type: "integer", description: "Entries evaluated; equals documents_total on a complete run." },
|
|
31344
|
+
{ name: "documents_total", type: "integer", description: "Total entries in the dataset." },
|
|
31345
|
+
{ name: "duration_ms", type: "integer", description: "Evaluation wall-clock time." },
|
|
31312
31346
|
{ name: "created_at", type: "string", description: "ISO 8601 creation timestamp." },
|
|
31313
|
-
{ name: "completed_at", type: "
|
|
31347
|
+
{ name: "completed_at", type: "string", description: "ISO 8601 completion timestamp." },
|
|
31314
31348
|
{ name: "links.self", type: "string", description: "URL to this benchmark run." },
|
|
31315
31349
|
{ name: "links.results", type: "string", description: "URL to the per-document results." }
|
|
31316
31350
|
]
|
|
@@ -31323,12 +31357,12 @@ var sections48 = [
|
|
|
31323
31357
|
"name": "Benchmark 2024-09-25",
|
|
31324
31358
|
"dataset_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
|
|
31325
31359
|
"user_schema_id": "5e6f7a8b-9c0d-1234-abcd-ef0123456789",
|
|
31326
|
-
"status": "
|
|
31327
|
-
"accuracy_overall":
|
|
31328
|
-
"accuracy_by_field":
|
|
31329
|
-
"documents_processed":
|
|
31360
|
+
"status": "complete",
|
|
31361
|
+
"accuracy_overall": 0.943,
|
|
31362
|
+
"accuracy_by_field": { "invoice_number": 1, "total_amount": 0.92, "vendor_name": 0.91 },
|
|
31363
|
+
"documents_processed": 50,
|
|
31330
31364
|
"documents_total": 50,
|
|
31331
|
-
"duration_ms":
|
|
31365
|
+
"duration_ms": 2380,
|
|
31332
31366
|
"accuracy_delta": null,
|
|
31333
31367
|
"compared_to_run_id": null,
|
|
31334
31368
|
"created_at": "2024-09-25T12:00:00.000Z",
|
|
@@ -31358,7 +31392,7 @@ var sections48 = [
|
|
|
31358
31392
|
],
|
|
31359
31393
|
faq: [
|
|
31360
31394
|
{ question: "Can I run multiple benchmarks simultaneously?", answer: "Yes. Benchmark runs are independent and can execute in parallel against different datasets or the same dataset." },
|
|
31361
|
-
{ question: "
|
|
31395
|
+
{ question: "Does the POST wait for the evaluation?", answer: "Yes. The evaluation runs inside the request and the response is the finished run with status complete and the accuracy fields populated. duration_ms records the exact evaluation time; a 50-entry dataset typically finishes in a few seconds." },
|
|
31362
31396
|
{ question: "Does a benchmark re-extract my documents?", answer: "No. It compares expected_data against the latest completed extraction result each document already has under the benchmark's user_schema_id. Make sure the documents have been processed with that schema before benchmarking." },
|
|
31363
31397
|
{ question: "Is user_schema_id required when creating a benchmark?", answer: "Yes. Both dataset_id and user_schema_id are required UUIDs. The schema defines which fields the benchmark evaluates, so extracted values and ground truth entries are compared on the same field set." }
|
|
31364
31398
|
],
|
|
@@ -36650,6 +36684,76 @@ var sections63 = [
|
|
|
36650
36684
|
{ question: "What is the raw_field_name in occurrences?", answer: "The `raw_field_name` is the original field name as it appeared in the source document before canonicalization. For example, a field canonicalized as `invoice_number` might have raw names like `Inv. No.`, `Invoice #`, or `Rechnungsnummer` depending on the document. This helps you understand the naming variations the registry has normalized." }
|
|
36651
36685
|
],
|
|
36652
36686
|
mentions: ["field detail", "recent occurrences", "similar fields", "cosine similarity", "name embedding", "field merge", "raw field name"]
|
|
36687
|
+
},
|
|
36688
|
+
{
|
|
36689
|
+
slug: "field-contract",
|
|
36690
|
+
parentSlug: "fields",
|
|
36691
|
+
title: "Registry Contract: Resolve, Card, Values, History",
|
|
36692
|
+
seoTitle: "Field Registry Contract \u2014 Resolve, Concept Card, Values, History",
|
|
36693
|
+
description: "The Field Registry as a source of truth for agents and apps: stable ids under curation, name resolution, named maturity levels, the concept card, cross-document values with provenance, curation history and field.* events.",
|
|
36694
|
+
content: [
|
|
36695
|
+
{ type: "paragraph", text: "These reads make the Field Registry safe to build on: an id you stored keeps working after a merge, a name resolves to the live concept, every read names its **maturity** level, and curation is announced on the event feed so a cached vocabulary can invalidate instead of polling." },
|
|
36696
|
+
{ type: "heading", level: 2, id: "field-maturity", text: "Maturity levels" },
|
|
36697
|
+
{ type: "paragraph", text: "Every `/v1/fields*` response carries `maturity` beside the frozen numeric `tier`. Treat it as the contract for what you may rely on." },
|
|
36698
|
+
{ type: "param-table", title: "Levels", params: [
|
|
36699
|
+
{ name: "core", type: "tier 1", description: "Universal, fully trusted. Safe to bind schemas, dashboards and downstream models to. Demotion is hysteresis-guarded and always emits `field.demoted`." },
|
|
36700
|
+
{ name: "proven", type: "tier 2", description: "Recurring and useful. Stable id; the name may still be groomed, announced by `field.renamed` / `field.merged`." },
|
|
36701
|
+
{ name: "candidate", type: "tier 3", description: "Newly discovered. May be merged, renamed or expire with no notice beyond the event feed. Do not hard-code." }
|
|
36702
|
+
] },
|
|
36703
|
+
{ type: "paragraph", text: "`GET /v1/fields?maturity=core|proven|candidate` filters by level. The list hides rows merged into another concept unless `include_superseded=true`, so a cached vocabulary never carries two ids for one concept." },
|
|
36704
|
+
{ type: "heading", level: 2, id: "field-identity", text: "Stable identity under curation" },
|
|
36705
|
+
{ type: "paragraph", text: "When curation merges a concept into a survivor, the absorbed row stays readable with `superseded_by: { id, links.self }` \u2014 `GET /v1/fields/{id}` never 404s a stored id. Pass `follow_redirects=true` to receive the survivor instead; the hops are listed in `redirected_from` so you can rewrite your keys." },
|
|
36706
|
+
{ type: "endpoint", method: "GET", path: "/v1/fields/resolve", summary: "Resolve a NAME to the live concept.", blocks: [
|
|
36707
|
+
{ type: "param-table", title: "Query parameters", params: [
|
|
36708
|
+
{ name: "name", type: "string", required: true, description: "The field name, in any spelling you hold: `Invoice No`, `invoice_number`, `Rechnungsnummer`." },
|
|
36709
|
+
{ name: "follow_redirects", type: "boolean", description: "Walk `superseded_by` to the survivor.", default: "true" }
|
|
36710
|
+
] },
|
|
36711
|
+
{ type: "paragraph", text: "Lookup order, first hit wins: exact `canonical_name` \u2192 the registry `match_key` fold (separator, case, accent and plural insensitive \u2014 the same fold the resolver binds with) \u2192 a merge alias \u2192 exact `synonyms[]` containment (names folded in by merges and cleanup) \u2192 case-insensitive canonical name \u2192 case-insensitive synonym. The first four arms are index lookups; the last two scan the tenant registry and run only when everything indexed missed. The response says which arm matched; no match is `404 unknown_field`." },
|
|
36712
|
+
{ type: "code", language: "json", title: "Response", code: `{
|
|
36713
|
+
"name": "Invoice No",
|
|
36714
|
+
"matched_by": "synonym",
|
|
36715
|
+
"redirected_from": ["b7c1\u2026"],
|
|
36716
|
+
"field": { "id": "a1b2\u2026", "canonical_name": "invoice_number", "maturity": "proven", "tier": 2, "synonyms": ["inv_no", "invoice no"], "superseded_by": null, "links": { "card": "/v1/fields/a1b2\u2026/card" } }
|
|
36717
|
+
}` }
|
|
36718
|
+
] },
|
|
36719
|
+
{ type: "heading", level: 2, id: "field-card", text: "The concept card" },
|
|
36720
|
+
{ type: "endpoint", method: "GET", path: "/v1/fields/{id}/card", summary: "One read that says what a concept means and how it behaves.", blocks: [
|
|
36721
|
+
{ type: "param-table", title: "Response sections", params: [
|
|
36722
|
+
{ name: "definition", type: "object", description: "`description`, `instruction` (the master extraction instruction), `variance_notes`, `synonyms[]`, `aliases[]`." },
|
|
36723
|
+
{ name: "identity", type: "object", description: "`pinned`, `source`, `link_key`, `superseded_by`, `absorbed[]` (concepts merged INTO this one that still exist as redirect rows)." },
|
|
36724
|
+
{ name: "occurrence", type: "object", description: "`occurrence_count`, `document_count`, `occurrence_rate`, `first_seen_at`, `last_seen_at`, `promoted_at`, `document_type_distribution`." },
|
|
36725
|
+
{ name: "values", type: "object", description: "Sources-IAM filtered distribution over the concept and its absorbed redirects: `total`, `distinct_count`, `top[]` (value, count, share), `examples[]`." },
|
|
36726
|
+
{ name: "usage", type: "object", description: "`schema_count`, `schema_field_count` \u2014 how many Specs bind the concept." }
|
|
36727
|
+
] }
|
|
36728
|
+
] },
|
|
36729
|
+
{ type: "heading", level: 2, id: "field-values", text: "Values across documents" },
|
|
36730
|
+
{ type: "endpoint", method: "GET", path: "/v1/fields/{id}/values", summary: "Current values of the concept across documents, with provenance.", blocks: [
|
|
36731
|
+
{ type: "param-table", title: "Query parameters", params: [
|
|
36732
|
+
{ name: "document_id", type: "string", description: "Only occurrences on this document." },
|
|
36733
|
+
{ name: "value", type: "string", description: "Case-insensitive contains filter on the value text." },
|
|
36734
|
+
{ name: "include_redirected", type: "boolean", description: "Include occurrences still bound to concepts merged into this one (`provenance.via_redirect: true`).", default: "true" },
|
|
36735
|
+
{ name: "limit / cursor / order", type: "string", description: "Cursor pagination, newest first by default (max 100 per page)." }
|
|
36736
|
+
] },
|
|
36737
|
+
{ type: "paragraph", text: "One row per bound occurrence \u2014 a per-cell table column is several rows sharing `document_id`. Each row carries `value`, `confidence`, and `provenance` (`raw_field_name`, verbatim `source_text`, the `resolved_by` band, `needs_confirmation`). Rows and `pagination.total` are Sources-IAM filtered as the key's minting user." }
|
|
36738
|
+
] },
|
|
36739
|
+
{ type: "heading", level: 2, id: "field-history", text: "Curation history and events" },
|
|
36740
|
+
{ type: "endpoint", method: "GET", path: "/v1/fields/{id}/history", summary: "The curation trail, newest first.", blocks: [
|
|
36741
|
+
{ type: "paragraph", text: "Event kinds: `tier_changed` (with `from_maturity` / `to_maturity` and `direction`), `merge_log_absorbed` / `merge_log_merged_into`, `absorbed`, `superseded`, `renamed`, `rewritten`, `split`, `deleted`, `alias_added`. Never follows redirects \u2014 the trail belongs to the id asked for." }
|
|
36742
|
+
] },
|
|
36743
|
+
{ type: "paragraph", text: "The same changes arrive live on `GET /v1/events` (and to webhook / delivery bindings) as `field.graduated`, `field.promoted`, `field.demoted`, `field.merged` and `field.renamed`. Every payload names the concept by stable `field_id`; `field.merged` carries `merged_into_id` and `mode` (`redirect` keeps the absorbed row, `deleted` removes it). Events are published only after the curation write has committed." },
|
|
36744
|
+
{ type: "callout", variant: "info", text: "Caching the vocabulary? Store `id`, read `maturity`, subscribe to `field.*`, and re-resolve through `GET /v1/fields/resolve` when a name stops matching. Never key on `canonical_name` alone." }
|
|
36745
|
+
],
|
|
36746
|
+
related: [
|
|
36747
|
+
{ label: "List Fields", slug: "list-fields" },
|
|
36748
|
+
{ label: "Get Field", slug: "get-field" },
|
|
36749
|
+
{ label: "Webhook Events", slug: "webhook-events" }
|
|
36750
|
+
],
|
|
36751
|
+
faq: [
|
|
36752
|
+
{ question: "A field id I stored now returns superseded_by. Did I lose data?", answer: "No. The absorbed row stays readable and its occurrences move to the survivor. Read `superseded_by.id` (or call with `follow_redirects=true`) and rewrite your key; `GET /v1/fields/{id}/values` on the survivor includes the not-yet-repointed occurrences with `provenance.via_redirect: true`." },
|
|
36753
|
+
{ question: "Which maturity level is safe to hard-code?", answer: "`core`. A `proven` concept keeps its id but its name may still be groomed; a `candidate` may be merged or expire. Subscribe to the `field.*` events either way so a cache never goes stale silently." },
|
|
36754
|
+
{ question: "How do I go from a name in a user prompt to the right concept?", answer: "Call `GET /v1/fields/resolve?name=` with the wording you have. It tries the exact canonical name, the registry spelling fold, merge aliases and synonyms in that order (then case-insensitive fallbacks), follows redirects, and tells you which arm matched \u2014 then read `/card` to confirm the definition and example values before querying." }
|
|
36755
|
+
],
|
|
36756
|
+
mentions: ["field registry", "maturity", "core", "proven", "candidate", "superseded_by", "follow_redirects", "resolve field name", "concept card", "field values", "field history", "field.merged", "field.promoted", "field.graduated", "field.renamed", "field.demoted"]
|
|
36653
36757
|
}
|
|
36654
36758
|
];
|
|
36655
36759
|
|
|
@@ -38069,6 +38173,9 @@ var sections65 = [
|
|
|
38069
38173
|
{ name: "data[].version_number", type: "integer", description: "Version number (monotonically increasing)." },
|
|
38070
38174
|
{ name: "data[].status", type: "string", description: "Version status (e.g. draft, active)." },
|
|
38071
38175
|
{ name: "data[].compiled_rules", type: "object | null", description: "Compiled execution plan for this version, when compiled." },
|
|
38176
|
+
{ name: "data[].compile_status", type: "string | null", description: "Latest compile outcome for the version, or null if never compiled." },
|
|
38177
|
+
{ name: "data[].compiled_at", type: "string | null", description: "ISO 8601 timestamp of the last successful compile." },
|
|
38178
|
+
{ name: "data[].dirty", type: "boolean", description: "True when the version has been edited since it was last compiled." },
|
|
38072
38179
|
{ name: "data[].created_at", type: "string", description: "ISO 8601 timestamp when this version was created." },
|
|
38073
38180
|
{ name: "links.self", type: "string", description: "URL to this version list." },
|
|
38074
38181
|
{ name: "links.policy", type: "string", description: "URL to the parent policy." }
|
|
@@ -38091,6 +38198,9 @@ var sections65 = [
|
|
|
38091
38198
|
"version_number": 3,
|
|
38092
38199
|
"status": "active",
|
|
38093
38200
|
"compiled_rules": { "steps": 8 },
|
|
38201
|
+
"compile_status": "ok",
|
|
38202
|
+
"compiled_at": "2024-10-15T11:31:00.000Z",
|
|
38203
|
+
"dirty": false,
|
|
38094
38204
|
"created_at": "2024-10-15T11:30:00.000Z"
|
|
38095
38205
|
},
|
|
38096
38206
|
{
|
|
@@ -38098,6 +38208,9 @@ var sections65 = [
|
|
|
38098
38208
|
"version_number": 2,
|
|
38099
38209
|
"status": "draft",
|
|
38100
38210
|
"compiled_rules": null,
|
|
38211
|
+
"compile_status": null,
|
|
38212
|
+
"compiled_at": null,
|
|
38213
|
+
"dirty": true,
|
|
38101
38214
|
"created_at": "2024-10-10T14:00:00.000Z"
|
|
38102
38215
|
}
|
|
38103
38216
|
],
|
|
@@ -38148,7 +38261,7 @@ var sections65 = [
|
|
|
38148
38261
|
type: "endpoint",
|
|
38149
38262
|
method: "GET",
|
|
38150
38263
|
path: "/v1/data-policies/{id}/fields",
|
|
38151
|
-
summary: "List declared output fields for a data policy.",
|
|
38264
|
+
summary: "List declared output fields for a data policy (its current version).",
|
|
38152
38265
|
description: "Requires read scope.",
|
|
38153
38266
|
blocks: [
|
|
38154
38267
|
{
|
|
@@ -38167,10 +38280,14 @@ var sections65 = [
|
|
|
38167
38280
|
params: [
|
|
38168
38281
|
{ name: "data", type: "array", description: "Array of field definition objects." },
|
|
38169
38282
|
{ name: "data[].id", type: "string", description: "Field row UUID." },
|
|
38283
|
+
{ name: "data[].version_id", type: "string", description: "The policy version these fields belong to (the current version, or the newest one when none is current)." },
|
|
38170
38284
|
{ name: "data[].field_key", type: "string", description: "Output field key name." },
|
|
38285
|
+
{ name: "data[].display_name", type: "string | null", description: "Human-readable label." },
|
|
38171
38286
|
{ name: "data[].field_type", type: "string", description: "Declared value type (e.g. string, number, date)." },
|
|
38172
|
-
{ name: "data[].
|
|
38173
|
-
{ name: "data[].
|
|
38287
|
+
{ name: "data[].position", type: "integer", description: "Display order within the policy." },
|
|
38288
|
+
{ name: "data[].include", type: "boolean", description: "Whether the field is emitted in the policy output." },
|
|
38289
|
+
{ name: "data[].source", type: "string | null", description: "schema_field when the field mirrors a Spec field, null for a policy-only field." },
|
|
38290
|
+
{ name: "data[].source_schema_field_id", type: "string | null", description: "The mirrored Spec field UUID, when source is schema_field." },
|
|
38174
38291
|
{ name: "links.self", type: "string", description: "URL to this field list." },
|
|
38175
38292
|
{ name: "links.policy", type: "string", description: "URL to the parent policy." }
|
|
38176
38293
|
]
|
|
@@ -38189,22 +38306,31 @@ var sections65 = [
|
|
|
38189
38306
|
"data": [
|
|
38190
38307
|
{
|
|
38191
38308
|
"id": "f1a2b3c4-0001",
|
|
38309
|
+
"version_id": "v3a2b3c4-0003",
|
|
38192
38310
|
"field_key": "country_code",
|
|
38311
|
+
"display_name": "Country code",
|
|
38193
38312
|
"field_type": "string",
|
|
38194
|
-
"
|
|
38195
|
-
"
|
|
38313
|
+
"position": 0,
|
|
38314
|
+
"include": true,
|
|
38315
|
+
"source": "schema_field",
|
|
38316
|
+
"source_schema_field_id": "sf1a2b3c4-0001"
|
|
38196
38317
|
},
|
|
38197
38318
|
{
|
|
38198
38319
|
"id": "f1a2b3c4-0002",
|
|
38320
|
+
"version_id": "v3a2b3c4-0003",
|
|
38199
38321
|
"field_key": "currency",
|
|
38322
|
+
"display_name": null,
|
|
38200
38323
|
"field_type": "string",
|
|
38201
|
-
"
|
|
38202
|
-
"
|
|
38324
|
+
"position": 1,
|
|
38325
|
+
"include": true,
|
|
38326
|
+
"source": null,
|
|
38327
|
+
"source_schema_field_id": null
|
|
38203
38328
|
}
|
|
38204
38329
|
],
|
|
38205
38330
|
"links": {
|
|
38206
38331
|
"self": "/v1/data-policies/p1a2b3c4-e5f6-7890-abcd-ef1234567890/fields",
|
|
38207
|
-
"policy": "/v1/data-policies/p1a2b3c4-e5f6-7890-abcd-ef1234567890"
|
|
38332
|
+
"policy": "/v1/data-policies/p1a2b3c4-e5f6-7890-abcd-ef1234567890",
|
|
38333
|
+
"version": "/v1/data-policies/p1a2b3c4-e5f6-7890-abcd-ef1234567890/versions"
|
|
38208
38334
|
}
|
|
38209
38335
|
}`
|
|
38210
38336
|
},
|
|
@@ -38248,7 +38374,7 @@ var sections65 = [
|
|
|
38248
38374
|
type: "endpoint",
|
|
38249
38375
|
method: "GET",
|
|
38250
38376
|
path: "/v1/data-policies/{id}/rules",
|
|
38251
|
-
summary: "List transformation rules for a data policy.",
|
|
38377
|
+
summary: "List transformation rules for a data policy (its current version).",
|
|
38252
38378
|
description: "Requires read scope.",
|
|
38253
38379
|
blocks: [
|
|
38254
38380
|
{
|
|
@@ -38267,11 +38393,14 @@ var sections65 = [
|
|
|
38267
38393
|
params: [
|
|
38268
38394
|
{ name: "data", type: "array", description: "Array of rule objects, ordered by ordinal." },
|
|
38269
38395
|
{ name: "data[].id", type: "string", description: "Rule UUID." },
|
|
38270
|
-
{ name: "data[].
|
|
38396
|
+
{ name: "data[].version_id", type: "string", description: "The policy version these rules belong to (the current version, or the newest one when none is current)." },
|
|
38397
|
+
{ name: "data[].field_key", type: "string | null", description: "Target output field key." },
|
|
38398
|
+
{ name: "data[].input_field_keys", type: "string[]", description: "Field keys the rule reads." },
|
|
38271
38399
|
{ name: "data[].rule_type", type: "string", description: "Rule type (e.g. select_field, transform, lookup_exact, script)." },
|
|
38272
38400
|
{ name: "data[].config", type: "object", description: "Rule-type-specific configuration." },
|
|
38273
|
-
{ name: "data[].ordinal", type: "integer", description: "
|
|
38274
|
-
{ name: "data[].
|
|
38401
|
+
{ name: "data[].ordinal", type: "integer", description: "Execution order within the version." },
|
|
38402
|
+
{ name: "data[].error_behavior", type: "string", description: "What a rule failure does to the row: flag, skip, or fail." },
|
|
38403
|
+
{ name: "data[].provenance_label", type: "string | null", description: "Label stamped on values this rule produces." },
|
|
38275
38404
|
{ name: "links.self", type: "string", description: "URL to this rule list." },
|
|
38276
38405
|
{ name: "links.policy", type: "string", description: "URL to the parent policy." }
|
|
38277
38406
|
]
|
|
@@ -38290,7 +38419,9 @@ var sections65 = [
|
|
|
38290
38419
|
"data": [
|
|
38291
38420
|
{
|
|
38292
38421
|
"id": "r1a2b3c4-0001",
|
|
38422
|
+
"version_id": "v3a2b3c4-0003",
|
|
38293
38423
|
"field_key": "country_code",
|
|
38424
|
+
"input_field_keys": ["country"],
|
|
38294
38425
|
"rule_type": "lookup_exact",
|
|
38295
38426
|
"config": {
|
|
38296
38427
|
"reference_table_id": "country_codes",
|
|
@@ -38298,22 +38429,27 @@ var sections65 = [
|
|
|
38298
38429
|
"output_column": "iso2"
|
|
38299
38430
|
},
|
|
38300
38431
|
"ordinal": 1,
|
|
38301
|
-
"
|
|
38432
|
+
"error_behavior": "flag",
|
|
38433
|
+
"provenance_label": null
|
|
38302
38434
|
},
|
|
38303
38435
|
{
|
|
38304
38436
|
"id": "r1a2b3c4-0002",
|
|
38437
|
+
"version_id": "v3a2b3c4-0003",
|
|
38305
38438
|
"field_key": "currency",
|
|
38439
|
+
"input_field_keys": ["country_code"],
|
|
38306
38440
|
"rule_type": "script",
|
|
38307
38441
|
"config": {
|
|
38308
38442
|
"script": "if record:get('country_code') == 'US' then return 'USD' end"
|
|
38309
38443
|
},
|
|
38310
38444
|
"ordinal": 2,
|
|
38311
|
-
"
|
|
38445
|
+
"error_behavior": "flag",
|
|
38446
|
+
"provenance_label": "Derived currency"
|
|
38312
38447
|
}
|
|
38313
38448
|
],
|
|
38314
38449
|
"links": {
|
|
38315
38450
|
"self": "/v1/data-policies/p1a2b3c4-e5f6-7890-abcd-ef1234567890/rules",
|
|
38316
|
-
"policy": "/v1/data-policies/p1a2b3c4-e5f6-7890-abcd-ef1234567890"
|
|
38451
|
+
"policy": "/v1/data-policies/p1a2b3c4-e5f6-7890-abcd-ef1234567890",
|
|
38452
|
+
"version": "/v1/data-policies/p1a2b3c4-e5f6-7890-abcd-ef1234567890/versions"
|
|
38317
38453
|
}
|
|
38318
38454
|
}`
|
|
38319
38455
|
},
|
|
@@ -45260,7 +45396,7 @@ curl -s -X POST https://api.talonic.com/v1/review-teams/$TEAM_ID/members \\
|
|
|
45260
45396
|
-d '{ "team_id": "3f2b9c44-1e0a-4b7c-9d21-5a8f0e6c3b12" }'`
|
|
45261
45397
|
},
|
|
45262
45398
|
{ type: "callout", variant: "info", text: "Team writes require a human workspace owner because teams are authority routing: whoever controls team membership controls who resolves approvals. Assigning an individual review, by contrast, is an operate-tier action any operator or granted agent can perform." },
|
|
45263
|
-
{ type: "paragraph", text: "
|
|
45399
|
+
{ type: "paragraph", text: "A team's `webhook_url` is a notification hook: whenever a review is raised with that team as assignee (`team_id` on `POST /v1/apps/:id/reviews`), Talonic POSTs the same JSON envelope the workspace-level `app.review.raised` webhook carries (`review_id`, `app_id`, `run_id`, `kind`, `question`, `team`) to that URL, unsigned and with the standard retry ladder. Platform-raised reviews (threshold holds, decision-agent failures, SLA fallbacks) arrive as `app.exception.raised` instead. Use the team hook for the team's own channel and the workspace webhook for your integration. Resolution flows back through the normal [resolve endpoint](app-reviews), so a team bot can read the inbox filtered to its assignments and resolve `data_request` reviews autonomously while leaving `approval` kinds to humans." }
|
|
45264
45400
|
],
|
|
45265
45401
|
related: [
|
|
45266
45402
|
{ label: "Human Reviews", slug: "app-reviews" },
|
|
@@ -45292,7 +45428,7 @@ var sections75 = [
|
|
|
45292
45428
|
{ type: "paragraph", text: "`GET /v1/agent-tasks` lists your workspace's document-scoped tasks, newest first, with `read` scope. Filter with `?status` (one of `available`, `claimed`, `submitted`, `timed_out`, `cancelled` \u2014 anything else is a 400), page with `?limit` (1\u2013100, default 50) and the opaque `?cursor` returned as `pagination.next_cursor`. The listing is keyset-paginated on `(created_at, id)`, so pages stay stable while new tasks are created ahead of your cursor." },
|
|
45293
45429
|
{ type: "paragraph", text: "Every route on this surface requires the credential to resolve to exactly **one tenant**. A key operating in the cross-tenant master view gets `400` with the message `Select one tenant for Agent task access` \u2014 task snapshots contain document values, and cross-tenant reads of that payload are never allowed. Additionally, Sources-IAM is evaluated as the **user who created the API key**: a task whose document sits behind a source restriction that principal is not admitted to is simply invisible (404 on fetch, absent from the list), never a 403." },
|
|
45294
45430
|
{ type: "paragraph", text: "`GET /v1/agent-tasks/:id` returns the full payload: the listing's metadata plus `input_snapshot` (the parked record's cells \u2014 and for product-grain tasks the `candidates` distributions, the frozen `autonomy` contract, the `anchor` document, and the `triggers` that parked it), `output_contract` (the declared output fields with `key`, `dataType`, `required`), free-text `instructions`, and `timeout_fallthrough` (what happens if no agent answers in time: `hold`, `skip`, or `route_to_review`)." },
|
|
45295
|
-
{ type: "callout", variant: "info", text: "The list endpoint returns
|
|
45431
|
+
{ type: "callout", variant: "info", text: "The list endpoint returns both grains. Every row carries grain (document or product); document-grain rows carry document_id and pipeline_document_id, product-grain rows carry record_id instead. Filter with ?grain=product to see only Agentic Review tasks." },
|
|
45296
45432
|
{
|
|
45297
45433
|
type: "endpoint",
|
|
45298
45434
|
method: "GET",
|
|
@@ -45305,6 +45441,7 @@ var sections75 = [
|
|
|
45305
45441
|
title: "Query parameters",
|
|
45306
45442
|
params: [
|
|
45307
45443
|
{ name: "status", type: "string", description: 'Filter to one status: available, claimed, submitted, timed_out, or cancelled. Any other value is rejected 400 ("Invalid agent task status").' },
|
|
45444
|
+
{ name: "grain", type: "string", description: 'Filter to one grain: document (Agent via MCP rail stage) or product (post-assembly Agentic Review). Any other value is rejected 400 ("Invalid agent task grain"). Both grains are listed when omitted.' },
|
|
45308
45445
|
{ name: "limit", type: "integer", default: "50", description: 'Page size, 1\u2013100. Out-of-range or non-integer values are rejected 400 ("limit must be 1..100").' },
|
|
45309
45446
|
{ name: "cursor", type: "string", description: `Opaque pagination cursor from a previous response's pagination.next_cursor. A malformed cursor is rejected 400 ("Invalid cursor").` }
|
|
45310
45447
|
]
|