LogoLogo
Release notesPython SDK docsDocs homeTextual CloudTonic.ai
  • Tonic Textual guide
  • Getting started with Textual
  • Previewing Textual detection and redaction
  • Entity types that Textual detects
    • Built-in entity types
    • Managing custom entity types
  • Language support in Textual
  • Datasets - Create redacted files
    • Datasets workflow for text redaction
    • Creating and managing datasets
    • Assigning tags to datasets
    • Displaying the file manager
    • Adding and removing dataset files
    • Reviewing the sensitivity detection results
    • Configuring the redaction
      • Configuring added and excluded values for built-in entity types
      • Working with custom entity types
      • Selecting the handling option for entity types
      • Configuring synthesis options
      • Configuring handling of file components
    • Adding manual overrides to PDF files
      • Editing an individual PDF file
      • Creating templates to apply to PDF files
    • Sharing dataset access
    • Previewing the original and redacted data in a file
    • Downloading redacted data
  • Pipelines - Prepare LLM content
    • Pipelines workflow for LLM preparation
    • Viewing pipeline lists and details
    • Assigning tags to pipelines
    • Setting up pipelines
      • Creating and editing pipelines
      • Supported file types for pipelines
      • Creating custom entity types from a pipeline
      • Configuring file synthesis for a pipeline
      • Configuring an Amazon S3 pipeline
      • Configuring a Databricks pipeline
      • Configuring an Azure pipeline
      • Configuring a Sharepoint pipeline
      • Selecting files for an uploaded file pipeline
    • Starting a pipeline run
    • Sharing pipeline access
    • Viewing pipeline results
      • Viewing pipeline files, runs, and statistics
      • Displaying details for a processed file
      • Structure of the pipeline output file JSON
    • Downloading and using pipeline output
  • Textual Python SDK
    • Installing the Textual SDK
    • Creating and revoking Textual API keys
    • Obtaining JWT tokens for authentication
    • Instantiating the SDK client
    • Datasets and redaction
      • Create and manage datasets
      • Redact individual strings
      • Redact individual files
      • Transcribe and redact an audio file
      • Configure entity type handling for redaction
      • Record and review redaction requests
    • Pipelines and parsing
      • Create and manage pipelines
      • Parse individual files
  • Textual REST API
    • About the Textual REST API
    • REST API authentication
    • Redaction
      • Redact text strings
  • Datasets
    • Manage datasets
    • Manage dataset files
  • Snowflake Native App and SPCS
    • About the Snowflake Native App
    • Setting up the app
    • Using the app
    • Using Textual with Snowpark Container Services directly
  • Install and administer Textual
    • Textual architecture
    • Setting up and managing a Textual Cloud pay-as-you-go subscription
    • Deploying a self-hosted instance
      • System requirements
      • Deploying with Docker Compose
      • Deploying on Kubernetes with Helm
    • Configuring Textual
      • How to configure Textual environment variables
      • Configuring the number of textual-ml workers
      • Configuring the number of jobs to run concurrently
      • Configuring the format of Textual logs
      • Setting a custom certificate
      • Configuring endpoint URLs for calls to AWS
      • Enabling PDF and image processing
      • Setting the S3 bucket for file uploads and redactions
      • Required IAM role permissions for Amazon S3
      • Configuring model preferences
    • Viewing model specifications
    • Managing user access to Textual
      • Textual organizations
      • Creating a new account in an existing organization
      • Single sign-on (SSO)
        • Viewing the list of SSO groups in Textual
        • Azure
        • GitHub
        • Google
        • Keycloak
        • Okta
      • Managing Textual users
      • Managing permissions
        • About permissions and permission sets
        • Built-in permission sets and available permissions
        • Viewing the lists of permission sets
        • Configuring custom permission sets
        • Configuring access to global permission sets
        • Setting initial access to all global permissions
    • Textual monitoring
      • Downloading a usage report
      • Tracking user access to Textual
Powered by GitBook
On this page
  • Recording a redaction request
  • Viewing the list of recorded requests
  • Filtering the requests
  • Previewing the request results
  • Testing changes to the redaction configuration
  • Displaying the Edit Request panel
  • Changing entity type handling options
  • Configuring added and excluded values for an entity type
  • Replaying the request
  • Clearing all of the configuration changes

Was this helpful?

Export as PDF
  1. Textual Python SDK
  2. Datasets and redaction

Record and review redaction requests

Required global permission: Use the Request Explorer

When you use the redact method to redact a plain text string, you can also choose to record the request.

The recorded requests are encrypted.

When you make the request, you specify the number of hours to keep the recorded request. After that amount of time elapses, the request is completely purged. Recorded requests are never kept more than 720 hours, regardless of the configured retention time.

From the Request Explorer, you can review your recorded requests to check the results and assess the quality of the redaction. You can also test changes to the redaction configuration.

You cannot view requests from other users.

Recording a redaction request

To record a redaction request, you include the record_options argument:

record_options = RecordApiRequestOptions(record=<boolean>, retention_time_in_hours=<number of hours>, tags=["tag name"])

The record_options argument includes the following parameters:

  • record - Whether to record the request. The default is False. To record the request, set record to True.

  • retention_time_in_hours - The number of hours to preserve the recorded request. The default is 1. After the retention time elapses, the request is purged completely.

  • tags - A list of tags to assign to the request. The tags are mostly intended to make it easier to search for requests on the Request Explorer page.

Viewing the list of recorded requests

The Request Explorer page in Textual contains the list requests that you recorded and that are not yet purged. You cannot view requests from other users.

To display the Request Explorer page, in the Textual navigation bar, click Request Explorer.

For each request, the list includes:

  • A 255-character preview of the text that was sent for redaction.

  • The tags assigned to the request.

  • The date when the request will be purged.

Filtering the requests

You can search for a request based on text that is contained in the redacted text, and by the tags that you assigned to the request.

To search by text from the string, in the search field, begin to type the text.

To search by an assigned tag, in the search field, type tags: followed by the tag to search for.

Previewing the request results

From the request list, to view the results of a request, click the request row.

By default, the preview uses Identification view. For each detected entity, Identification view displays the value and the entity type.

To instead display only the replacement value, which by default is the entity type, click Replacement.

Testing changes to the redaction configuration

From the preview, you can test how the results change when you:

  • Change the handling option for entity types.

  • Add and exclude values for entity types.

Displaying the Edit Request panel

To display the edit panel, from the request preview page, click Edit.

The Edit Request panel displays the full list of the available entity types.

Changing entity type handling options

You can change how Textual handles detected entity values for each entity type.

Note that the handling option changes are not saved when you close the preview and return to the requests list.

Available handling options

The handling options are:

  • Off - Indicates to ignore values for this entity type.

  • Redact - This is the default option. Indicates to replace each value with a token that represents the entity type.

  • Synthesize - Indicates to replace each value with a realistic replacement value.

Changing the handling option for a single entity type

To change the handling option for a single entity type, either:

  • Click the handling option value for the entity type, then select the handling option.

  • Click the entity type, then under Generator, click the handling option.

Selecting the same handling option for all entity types

To select the same handling option for all of the entity types:

  1. Click Bulk Edit.

  2. From the Bulk Edit dropdown list, select the handling option.

Configuring added and excluded values for an entity type

To configure added and excluded values for an entity type, click the entity type.

The Edit Request panel expands to display the Add to detection and Exclude from detection lists.

  • You use the Add to detection list to configure regular expressions to identify additional values to detect as the selected entity type.

  • You use the Exclude from detection list to configure regular expressions to identify values to not detect as the selected entity type.

Note that the added and excluded values are not saved when you close the preview and return to the requests list.

Creating a regular expression for an added or excluded value

To create a regular expression for added or excluded values:

  1. Click the Add regex option for that list.

  2. In the field, provide a regular expression to identify values to add or exclude.

  1. Press Enter.

Editing a regular expression for added or excluded values

To edit a regular expression:

  1. Click the edit icon for the expression.

  2. In the field, edit the expression.

  1. Click the save icon.

Deleting a regular expression for added or excluded values

To delete a regular expression, click the delete icon for that expression.

Viewing whether an entity type has added or excluded values

When an entity type has added values, the added values icon displays for that entity type.

When an entity type has excluded values, the excluded values icon displays for that entity type.

Replaying the request

To replay the request based on the current configuration, click Replay.

When you replay the request, in addition to the Identification and Replacement options, you use the Diff toggle to indicate whether to compare the original and new results.

For our example, we made the following changes to the configuration:

  • For Given Name and Family Name, changed the handling option to Synthesize.

  • For Credit Card, indicated to ignore the value 41111111111.

Replayed results views with the Diff toggle off

When the Diff toggle is in the off position, Identification view only reflects changes to the added and excluded values.

In our example, we configured 41111111111 to not be detected as a credit card number. In the replayed request, it is instead detected as a numeric value.

Replacement view reflects both the added and excluded values and the changes to the handling option.

For our example, in addition to the entity type change for the credit card number 41111111111, the given and family names are now realistic replacement values instead of the entity types.

Replayed results views with the Diff toggle on

When you set the Diff toggle to the on position, the preview displays the original content to the left, and the modified content to the right.

In Identification view, you can see the changes to the entity detection based on the added and excluded values.

In Replacement view, you can also see the changes to the selected handling options for the entity types.

Clearing all of the configuration changes

To clear all of the regular expressions for all of the entity types, click Remove Changes.

Last updated 14 days ago

Was this helpful?

Request Explorer page for redaction requests from the SDK
Identification view of the redaction preview
Replacement view of the redaction preview
Edit Request panel with the list of entity types
Handling option dropdown for an entity type on the Request Explorer preview
Generator panel to select the entity type handling option
Bulk Edit dropdown to set the handling option for all entity types
Edit Request panel with the Add to detection and Exclude from detection lists
Field to create an added or excluded value regular expression
Saved regular expression for a value
Edit field for a regular expression
Added values icon for an entity type in the Request Explorer
Excluded values icon for an entity type in the Request Explorer
Replay button for a previewed request
Identification view of a replayed request with Diff off
Replacement view of a replayed request with Diff off
Identification view of a replayed request with Diff on
Replacement view of a replayed request with Diff on
Remove Changes button for a previewed request