Redact
Category: Processing
The Redact activity irreversibly removes sensitive data from a transaction: it blacks out the data on the page images, removes it from the recognized text, and replaces it in the extracted fields. Every step after it, the viewer, exports and the assistant, sees only the redacted content.
There is no undo within the transaction. Anything that needs the original values (an export of them, a webhook, a reviewer who must see them) belongs before the Redact step in the workflow; place Redact later, or last, when it should only protect what leaves the system.
What it finds
- Categories: kinds of sensitive data, such as person names, email addresses, phone numbers or IBANs. Each is found by patterns, by the AI model reading the page, or both. The categories are the project's library: the shipped ones, which you can adjust, and the project's own.
- Fields: extracted fields whose values are redacted whatever they hold: fields you tick one by one (a table's column covers that column in every row), every field of a document type, or every field. A type's "all" and All fields also take in fields added later.
A value found is blacked out wherever it is printed on the page, not only where it was first found, unless you choose otherwise (below).
Settings
The Redact step's panel has six blocks, all folded when it opens. Folded, each block says what it holds, in grey where a value is what a new step starts with and in black where someone changed it. The switch in the panel's header turns the step off.
Categories. The categories this step redacts. Choose categories opens the list by group, with search and a region filter: tick single categories, or a whole group, which also covers the categories a later release adds to it. Save writes your choice to the step; Cancel leaves it as it was. Below, Manage categories opens the project's library, where you add your own categories and adjust the shipped ones; a change there reaches every Redact step of the project. A new step starts with eight common categories. A step saved without any reads No categories.
A step created before categories became the project's library may hold categories of its own. It keeps redacting with them, and the block says so, with Move to the project's library: its categories become library categories (under a name that adds the step's name, where the library already has the name), and the step chooses them, so it redacts what it did. Where the step chose a whole group that holds a category it had changed, it now chooses that group's categories one by one, its changed copy among them. Another step that chooses a whole group redacts what the group holds: a moved category that joins the group is redacted there too, as one you add to the group in the library would be, and the block names those steps after the move, and says when the AI finds the category. A move that would change another step's categories any other way, such as a category name the step holds that the library lacks, is refused with that step's name.
Fields. The fields this step redacts. Choose fields opens Fields to Redact, which lists the project's fields as Extraction Settings does: General fields, then each document type's own, every table with its columns and every group with its fields, each list in alphabetical order, with a search box.
- Tick a field, a column, or a whole table or group.
- Tick a section's box to redact all of its fields, and any added later. The box of a document type covers every field its documents hold except the general ones, including fields a Transform step adds.
- Tick All fields, and any added later to redact every field of every document.
- Ticking the last field of a section ticks the section's box, so the fields added to it later are redacted too.
- Clearing one field, table, column or section under a ticked type's box, or under All fields, leaves out that row alone: the box stays, shows a dash, and still takes in what is added to it later (fields, and under All fields document types too). Tick the row again to redact it again. Clearing one column of a ticked table keeps the table's other columns ticked one by one.
- A row ticked inside a row that is left out is redacted: a field you tick is always redacted.
Save writes your choice to the step; Cancel leaves it as it was. A step saved by an older version may name fields by their names; those show ticked on every field they match, in every type, as the step redacts them. An entry the list cannot show, such as a field or type the project no longer has, is listed under the fields to remove. A new step starts with no fields.
A field the page does not print as stored, such as a yes or no field or a computed total, has nothing to black out on the page. When only an "all" chose it, the step records a warning naming it and goes on, whatever If a Target Cannot Be Located says (Options); its value is still removed from the data and the exported files. A field you tick one by one follows that option.
When it runs. The documents the step redacts: Every document type, or Only these types, ticked from the project's document types. Categories are searched, and fields redacted, on those documents only, and the pages that belong to no document are then left as they are. A new step starts with every document type.
Model. The model that reads the pages for the categories found by AI, and what it reads: the page images, the recognized text, or both. Categories found by patterns need no model.
Options.
| Setting | What it does | A new step starts with |
|---|---|---|
| Value Action | What replaces a redacted value in the extracted data: remove it, replace it with a placeholder, or mask it keeping its last characters. The page image is always fully blacked out. | Remove value |
| Region Strategy | Whether every printing of a redacted value on the pages is blacked out, or only the field's own boxes. | Every printing of the value |
| Barcode Redaction | Barcodes and QR codes that encode a redacted value are blacked out too. Uses the barcodes found at the OCR step, so turn on a barcode engine there. | Barcodes containing a redacted value |
| If a Value Cannot Be Anchored to the Page | When the AI finds a value on the page but the recognized text cannot place it, its pixels may still be visible. Raise a review issue so a person draws the region, fail the step, or record a warning. A person reviews the issue at a Human Review step after the Redact; whether to add one is yours, as for fields the AI extracts. Without one, the issue stays open on the transaction and the next steps get the page as it is; an If step's preset There are issues to review can route such a transaction elsewhere. | Raise a review issue |
| If a Target Cannot Be Located | When a field to redact has no position on the page and its value is not found in the text: fail the step, or record a warning. A field chosen only by an "all" always records a warning. | Fail the step |
Advanced. The answer length of the model's calls.
Exits. Where the transaction goes after the step, and what happens when it fails: If the step fails. A Redact that fails writes nothing, so Go to another step and Continue with the next step pass the pages and the data on unredacted, including when the step's own check finds a value still on a page; the workflow editor warns about it.
Three tuning settings have no control in the panel: box_padding_px (the margin around a blacked-out region, 2 pixels), word_overlap_threshold (how much of a word a region must cover to remove it from the text, 0.5) and min_match_length (below it, 4 characters by default, a value is redacted only where it stands as a word of its own, never inside a longer one such as a date, a price or a code; a field's value found nowhere on the page records a warning, and a pattern's match in Chinese, Japanese, Thai or another script written without spaces that one space separates from its label, as in a form's "性别 男" or "性別 男", is redacted too; one glued to the next character, such as "男" in "男士", is not). Set them through the workflow API, or see them in the panel's JSON view.
Text limit
A Redact step reads every page it redacts, across the whole transaction, and checks its own work before it changes any of them. How much one step may hold follows the server: a quarter of its memory, shared among the steps the server can run at once (its workflow workers). A server of 2 GiB that runs 4 steps at once allows 128 MiB a step. That is about 300 pages with something to black out, because the blacked-out copy of each such page is held until the step writes it, and several thousand pages with nothing to black out. Over it, the step fails at once, before it changes anything, with the cause Too much text to read (too_much_text); what follows is the step's choice under Exits above, where continuing takes the transaction on unredacted. To redact it, split the upload into smaller transactions, or set When it runs to the document types that need it. On a self-hosted server, more memory or fewer workflow workers allow more.
Notes
- The step checks its own work: it fails rather than complete with a found value still in the text.
- When the AI finds a value that the recognized text does not hold as written, such as a name the text recognition misread, the step looks for near matches of it on the pages, the page the AI named first. It does the same on each page the AI named where that page's printing is misread, even when the value is found as written on other pages; a page where the near match finds nothing is treated as a value that cannot be anchored there. That search has a limit for each step, so a transaction with very many such values cannot hold the server for hours. The values the search had not finished at the limit are treated as values that cannot be anchored, and If a Value Cannot Be Anchored to the Page decides what follows: a review issue for each (the default), a failed step, or, with Record a warning, a completed step where their pixels may still be visible. The step records how many values reached the limit, never the values: in a warning, or in the failure's message when it fails. An ordinary transaction stays far below it.
- A re-run from a checkpoint before the Redact step starts from the unredacted state and redacts again.
- What a redaction removed is recorded as counts per category and field, never the values.