Free cookie consent management tool by TermsFeed

Create a Document Redaction AI Skill

On This Page
The capabilities described on this page are included in Appian's advanced and premium capability tiers. Usage limits may apply.

This page explains how to create a Document Redaction AI skill to automatically detect and permanently remove sensitive information from PDF documents. After you create and configure the skill, you call it from a process model using the Redact Document smart service to produce a redacted copy of a document.

Create a Document Redaction AI skill

Creating a Document Redaction AI skill establishes the design object where you configure the redaction rules that detect and remove sensitive information.

Before you create a Document Redaction AI skill, confirm that the documents you plan to redact are PDFs of up to 10 MB and 25 pages.

To create a Document Redaction AI skill:

  1. In the Build view, click NEW > AI Skill.

    new-menu-ai-skill

  2. In the Redaction section, select Documents. The configuration screen displays.

    create-skill

  3. Configure the following properties:

    Property Description
    Name Enter a name that follows the recommended naming standard.
    Description (Optional) Enter a brief description of the AI skill.
  4. Click CREATE.
  5. On the Review AI Skill Security window, configure security.
  6. Click SAVE. The AI skill opens in a new dialog or window.

Configure redaction rules

Redaction rules tell the Document Redaction AI skill what to detect and remove from a document. You can configure one or more of three methods:

All methods run when the skill executes, and the skill redacts the union of the results. If two methods detect the same text, the skill records a match for each method and redacts the text once.

Note:  Only text identified via the redaction method configuration will be redacted.

Choose a method based on the kind of sensitive information you want to redact:

  • Keyword matching: Use to redact exact values you can list, such as specific names or terms. Keyword matching uses an OCR model to detect text and its location, and does not consume a generative AI model.
  • Regular expression matching: Use to redact structured values that follow a consistent pattern, such as tax file numbers or credit card numbers. Like keyword matching, it uses an OCR model to detect text and its location and does not consume a generative AI model.
  • Semantic matching: Use to redact complex or varied information that is easier to describe than to enumerate, such as handwritten values or contextual personally identifiable information (PII). Semantic matching uses an OCR model to detect text location and a generative AI model to identify the text to redact.

You can enable all three methods at the same time. Each method you enable runs when the skill executes.

The three redaction method panels in the Document Redaction AI skill: keyword matching, regular expression matching, and semantic matching.

Configure keyword matching

Keyword matching redacts exact string values that you provide. Keyword matching trims leading and trailing whitespace from each keyword and then matches without regard to case, so Confidential matches confidential and CONFIDENTIAL.

To configure keyword matching, add each value you want to redact to the keyword list. You can enable a whole-word toggle to redact a keyword only when it appears as a complete word rather than as part of a larger word.

Keyword matching has the following guardrails:

  • Maximum keywords: Up to 100 keywords per skill.
  • Maximum keyword length: Up to 200 characters per keyword.

Configure regular expression matching

Regular expression matching redacts text that matches a pattern you provide. Regular expression matching uses Java regular expression syntax and is case-sensitive by default. To make a pattern case-insensitive, add the (?i) modifier at the start of the pattern. For example, (?i)hello matches hello, HELLO, and HeLLo.

Regular expression patterns are not trimmed, so any leading or trailing spaces you include are part of the match. When a match is found, the resulting redaction box excludes those leading and trailing spaces, because the bounding boxes returned by the text recognition service do not include spaces.

For example, an Australian tax file number pattern might look like this:

1
\d{3}\s?\d{3}\s?\d{3}

Regular expression matching has the following guardrails:

  • Maximum patterns: Up to 100 patterns per skill.
  • Maximum pattern length: Up to 200 characters per pattern.

Configure semantic matching

Semantic matching uses a generative AI model to detect sensitive information from a natural language description, rather than from exact values or patterns. Use semantic matching when the content you want to redact is easier to describe than to enumerate, such as handwritten values or contextual personally identifiable information (PII).

To configure semantic matching, select a provider and model, then enter a natural language description of what to redact. For example:

1
Redact all tax file numbers and credit card numbers.

For the most accurate results, use the latest reasoning models available from your provider. Newer reasoning models generally detect sensitive information more reliably than older ones.

Semantic matching has the following guardrail:

  • Maximum instruction length: Up to 150,000 characters.

Note:  All redaction methods consume AI Actions, because the skill runs text recognition on every page. Semantic matching consumes the most AI Actions, because it runs a generative AI model in addition to text recognition.

Test the skill

The test panel in the AI Skill Designer lets you run the Document Redaction AI skill's redaction rules against a sample document and review the results before you use the skill in a process.

To test the skill:

  1. In the test panel, upload a test PDF document.
  2. Click TEST.
  3. Review the results:
    • Redacted document: Click the DOWNLOAD link to download the redacted PDF.
    • Match details: Review the JSON output, which lists each match with the redacted text, the method that detected it (keyword, regex, or semantic), the keyword or pattern that matched, the bounding boxes, and the page number.

    test redaction

Use the Redact Document smart service

After you configure the skill, call it from a process model using the Redact Document smart service. The smart service produces a redacted copy of a PDF and saves it to an Appian folder.

Document Redaction AI skill guardrails

The Document Redaction AI skill and the Redact Document smart service enforce the following guardrails:

Guardrail Limit
Maximum input file size 10 MB
Maximum pages 25
Maximum output file size 25 MB
Maximum keywords 100
Maximum keyword length 200 characters
Maximum regular expression patterns 100
Maximum regular expression pattern length 200 characters
Maximum semantic instruction length 150,000 characters

The Document Redaction AI skill also consumes AI Actions each time it runs, because the skill runs text recognition on every page and, for semantic matching, a generative AI model. To find how many AI Actions a redaction consumed, read the AI Actions Consumed output of the Redact Document smart service.

How the Document Redaction AI skill produces a redacted document

The Redact Document smart service permanently removes detected text from the document and returns an image-only PDF. Because the output has no text layer, the redacted text cannot be recovered in any of the following ways:

  • Copy and paste: Selecting and copying text from the output document returns nothing.
  • Search: Searching the output document with Ctrl+F finds no text.
  • Text extraction: Running text extraction tools against the output document returns no text.
  • Metadata inspection: Inspecting the output document's metadata reveals no redacted text.

Because the redacted text is not present in any of these forms, sensitive information is truly removed rather than just visually hidden.

Redaction is permanent. The output document does not retain the original text, so a redacted value cannot be restored from the output.

Font rendering in redacted documents

To apply redactions, the Redact Document smart service re-renders each page of the PDF. If a document does not embed its fonts, the service substitutes a font that resembles the original, and preserves character positions, line breaks, and pagination so the layout is unchanged. Latin-script text is supported. Non-Latin scripts, such as Chinese, Japanese, Korean, Hebrew, Arabic, Devanagari, and Thai, and symbol fonts are not supported for non-embedded fonts, and text in these scripts may render incorrectly or be missing from the output.

Font substitution applies only to fonts that a document does not embed. Most PDFs produced by word processors, design tools, and browsers embed their fonts and render exactly as authored, in any script. Scanned documents and page images are not affected, because text in an image has no font to substitute. To avoid substitution, embed fonts when you author the document.

Font substitution does not affect which content is redacted. Redacted regions are removed from the page image, so the text beneath them is not present in the output document, whichever font was used to render the page.

Feedback