Extractors
Extractors in the sidebar is the builder for extractors: one screen where you describe a document kind, add fields and rules, run the draft on a real document, see every value traced back to the page, grow a test set, and publish a version. Everything the builder does is also available through the API; the dashboard calls the same operations with your session, so the audit log shows who did what.
The list
Section titled “The list”Each card shows the extractor’s title and API name, the published version (or draft when it has never been published), when it was last published and edited, and Draft ahead when the draft differs from the published version. Open a card to work on it, or follow Runs to its review queue. Owners and admins can archive an extractor from its card; archived extractors answer 404 extractor_not_found on the API and are hidden from the list. Lookup lists in the header opens the project’s lookup lists, the CSVs rules match against with lookup().
New extractor offers three ways in:
- From a document: drop one typical document. Deskew parses it once, proposes the description, fields, types, aliases and a few rules, creates the extractor with that proposal, keeps the sample as the first test document and opens the workspace on it with the first run already started. Costs the parse credits of the document plus 10 credits. Anything from the proposal that could not be used is mentioned in the dialog.
- From a starter: clone one of the starters (hospital invoice, discharge summary, pharmacy bill, diagnostic report, prescription, health claim form, motor repair estimate, identity document), optionally with its sample documents and expected output copied into the test set so the score shows at once.
- Blank: a title and one placeholder field.
The title can change later; the API name (lowercase letters, digits, - or _) is permanent.
The workspace
Section titled “The workspace”Three panes, like the Playground:
- Definition on the left: Document (title, description, must contain, reject if, languages, page range, locale), Fields, Rules, Output and an Advanced tab with the whole definition as JSON, two-way synced with the form. Every edit is saved to the draft after a short pause (or at once with ⌘S); the footer says Saving, Saved or how many problems the server found, and problems appear under the field or rule they concern.
- Document in the middle: drop a file or pick one from the test set. After a run, every extracted value is drawn on the page where it was read: terracotta for a verified value, amber for low confidence or a source Deskew could not locate, red for a field involved in a failed rule, dashed grey for not found. Hover or click a box to highlight the field in the other panes; hover a field elsewhere and the page scrolls to its box. Office and email documents, which have no page image, show the extracted text with the source snippets listed underneath.
- Output on the right: Result (status pill, flags first, then the data tree with an evidence dot per value and a tooltip showing page, confidence and the source text), Test set, Versions and the raw JSON.
Run on this (⌘↵) runs the draft on the loaded document through the Playground endpoint in the current mode, so a run costs what an API call with extractor=<name>@draft costs. Switch the sidebar to Test while building; test mode has its own daily cap.
Fields
Section titled “Fields”Add a field with a name and a type; everything else is optional and folded away. Expand a field for examples, aliases (other labels the value appears under), a default, normalisation (trim, collapse whitespace, upper or lower case), a regex the value must match, the allowed values of an enum, and the row limits of a group. Object and group fields contain their own fields, up to three levels deep. Names are checked as you type (lowercase, unique, not reserved). When a result is loaded, each field shows the value it produced, coloured by its evidence state, so a description that is not working is visible immediately.
Each rule has an id, a check expression, an optional when guard, a message and a severity. The expression input offers field paths and functions as you type and points out unbalanced parentheses or unknown names before you save. With a result loaded, each rule shows its outcome on that document: passed, failed with the values it read, or skipped because an input was null. Four templates cover the common cases: rows that add up to a total, dates in order, a field that matches a pattern, and a document not older than a year. See Rules for the language.
Correcting a value
Section titled “Correcting a value”Hover a value in the Result tab and choose wrong? to type the right one. The correction is stored as the expected output for that document; if the document is not yet in the test set it is added. Nothing is trained: the test set grows, and the score moves as you edit the definition.
Test set
Section titled “Test set”The Test set tab lists the extractor’s test documents with whether they have expected output and how they did on the latest run. Add document uploads a sample; Add to test set in the document pane adds the loaded document with the current result pre-filled as its expected output, ready to correct. Run all runs the draft over every document as test-mode jobs and fills in pass or fail per document, the field accuracy, the worst fields (the ones to fix first), and a per-field diff (match, mismatch, missing, extra) when you open a row. Click a row to load that document, with the run’s own result, into the document pane. Expected output can be edited as JSON per document, or filled from the latest actual.
Publishing and versions
Section titled “Publishing and versions”Publish shows the plain-language difference between the draft and the published version (fields added, removed or retyped, descriptions edited, rules changed, output options), the latest test run’s summary, and a notes field. Publishing is refused while test documents fail on the draft; the dialog offers Publish anyway when that is intended. A warning appears when the test set has not been run since the last edit.
The Versions tab lists every published version with its notes and test summary, shows the diff between the draft and the published version or between any two versions, lets you load an old definition into the draft, and Roll back, which publishes a new version equal to an older one. Nothing is ever rewritten; API calls pinned to name@3 keep working. See Test sets and publishing.
Runs (from the list, a card, or the workspace header) is the review queue: every job that used the extractor in the current mode, filtered by OK, Flagged or Rejected with counts, with the number of flags, the version used and the credits. Add to test set on a run copies the job’s original file into the test set so a real-world miss becomes a regression test in one click. Each row links to the job, where the review workspace shows the same evidence overlay on the stored pages.
Packets
Section titled “Packets”Packets in the sidebar submits several documents together and shows the result as one: a list with status chips and per-document dots, and a detail page with the documents table (role, extractor, routing confidence, link to the job), the packet rules and flags, and the extracted data by role. New packet takes several files, an optional packet definition (or none, to route only) and manual extractor assignments per file. Definitions manages packet definitions in a form: roles with extractor, minimum and maximum, and rules with inline validation; start from the health-claim starter or blank. See Packets.