← Back to all posts

Pseudonymization

On this page

Purpose

Pseudonymization detects selected types of sensitive information in a Message and replaces each detected value with a tag that Restoration can later resolve. Detection is designed for English text and can miss values.

Pseudonymization starts a protected segment in the flow. A detected value is raw before this component and replaced by a tag for every component inside the segment. It becomes raw again only after a paired Restoration component closes the segment later in the same flow.

When to use it

  • Keep a detected email address, phone number, or other selected category out of an Agent or model while it reasons, and put the real value back before the user sees the answer.
  • Pass stable tags through several components, such as an Agent, a model, or a tool, and restore the originals only where they are actually needed.
  • Use Guardrail instead when the flow should route or block a Message rather than change its text.

Required setup

At least one Category must be selected. There is no default selection, and Pseudonymization refuses to run until one is chosen.

How to use it

  1. Connect a Message value to Input, typically from Chat Input.
  2. Select at least one category to detect.
  3. Connect Pseudonymized Output to the first step that should receive tags instead of the detected values, typically an Agent or a language model.
  4. Add a Restoration component later in the same flow, after the last step that should receive tags, so those tags resolve before the answer reaches the user.

Typical flow: Chat Input -> Pseudonymization -> Agent or model -> Restoration -> Chat Output.

Configuration

SettingWhat it controlsRecommended starting point
InputThe Message inspected and transformed.Connect it immediately after the component that first produces user-entered data, such as Chat Input.
CategoriesThe categories detected and replaced with a tag.Select every category the flow needs. There is no default, and at least one is required.

The categories picker offers:

  • Credit card number
  • Date or time
  • Email address
  • Location
  • Person name
  • Phone number
  • URL

The picker does not cover every possible type of sensitive information. For example, IP addresses are not currently available and are not detected. Text in another language, or a value that does not match a detection pattern, may also pass through unchanged. Selecting a category does not guarantee that every instance will be detected.

Example

A user enters:

Contact john@example.com or call +1 202-555-0147 about the appointment.

With Email address and Phone number selected, Pseudonymized Output contains:

Contact [EMAIL_ADDRESS_1] or call [PHONE_NUMBER_1] about the appointment.

An Agent inside the protected segment might respond:

I've reached out to [EMAIL_ADDRESS_1] and left a message at [PHONE_NUMBER_1].

After a downstream Restoration component resolves the tags, the answer the user sees is:

I've reached out to john@example.com and left a message at +1 202-555-0147.

The tag numbers are examples. The actual numbers depend on tags already used in the session.

Expected result

Each detected value of a selected category is replaced by a tag that remains stable for the rest of the same chat session. The same value detected the same way gets the same tag every time it recurs, so a downstream Restoration component can resolve it back to the original. A value detected with a different boundary, casing, punctuation, or category receives its own separate tag. For example, Alex@example.com and alex@example.com are not guaranteed to receive the same tag.

Reference details

Pseudonymization always processes Message text as one text segment. When attachment protection is available in your workspace, it also processes each attachment filename and the extracted text from each attachment as separate segments. Each processed segment can contain at most 32,768 UTF-8 bytes. For English prose, this is about 4,000 to 6,000 words, or roughly 8 to 12 text-heavy A4 pages at about 500 words per page.

The word and page counts are estimates, not additional limits. Non-English text, symbols, tables, formatting, and the way text is extracted from a file can reduce or increase how much fits. File size and page count alone do not determine whether an attachment fits.

Pseudonymization rejects the whole Message if any one segment exceeds the limit. It does not split or truncate text automatically because doing so could separate or omit sensitive information. If this happens, shorten the Message or split the attachment text into smaller files, then try again.

  • Chat Input is the typical source of the value connected to Input.
  • Restoration closes the protected segment and resolves this component's tags back to their original values.
  • Guardrail routes a Message on detected PII or moderation categories instead of changing its text.
← Back to all posts