Implementation Guide

Deciding Which Data Classes to Block vs Redact in LLM Prompts

Block a prompt when the data class is severe, its exposure cannot be reversed, and the task does not need it, or when the destination is not trusted to hold it. Redact when the task can succeed with the sensitive value removed or replaced and the detector is reliable enough to trust. Treat the choice as a runtime policy that combines data class, destination trust, detection confidence, and task utility, and log every decision.

Treat block vs redact as a policy design problem

Whether to block or redact is not a property of the data alone. A sound decision framework maps each data class to an action (block, redact, or allow) and then adjusts that action using the context of the request. Four inputs drive the decision:

  • Data class: how severe exposure would be, and whether it can be reversed.
  • Destination trust: whether the destination is trusted to hold the data.
  • Detector confidence: whether the detector is reliable enough to trust.
  • Task utility: whether the task can succeed with the sensitive value removed or replaced.

The framework is then enforced as runtime policy, with every decision logged.

Block or redact decision path

  1. ClassifyIdentify the data class and detector confidence at each boundary.
  2. EvaluateWeigh severity, reversibility, destination trust, and task need.
  3. EnforceBlock, redact, or allow before content reaches the model or tool.
  4. RecordLog the decision without storing the sensitive value.

Starting defaults by data class

Begin with a default action for each data class, then let destination trust, detector confidence, and task utility adjust it. The table summarizes when each action applies.

Default actions and the conditions that favor them
ActionWhen it appliesKey inputs
Block The data class is severe, its exposure cannot be reversed, and the task does not need it. Also applies when the destination is not trusted to hold it. Data class, reversibility, destination trust, task need
Redact The task can succeed with the sensitive value removed or replaced, and the detector is reliable enough to trust. Task utility, detector confidence
Allow The data class is one your framework maps to allow. Data class, destination trust

Let destination and boundary change the action

The same data class can call for different actions depending on where it is going. If the destination is not trusted to hold the data, the prompt should be blocked. Because content crosses several boundaries (prompts, context, and tool calls), classify and evaluate at each one rather than only at the first prompt.

Account for detection error before choosing the action

Redaction depends on the detector. Redact only when the detector is reliable enough to trust, and record detector confidence alongside the data class at each boundary. When confidence is not high enough to trust, factor that error into the choice before you commit to redaction.

Preserve task utility when you redact

Redaction is appropriate when the task can still succeed with the sensitive value removed or replaced. Check task need explicitly: if the task does not need the value, a severe and irreversible data class is a strong candidate for blocking. If the task can succeed without it, redaction keeps the request useful while removing the exposure.

Enforce the framework as runtime policy and log it

Apply the decision before content reaches the model or tool, so that block, redact, and allow actions are consistent across prompts, context, and tool calls. Log every decision with audit-ready detail, and do not store the sensitive value in the log.

  • Record the data class and detector confidence that triggered the decision.
  • Record the action taken: block, redact, or allow.
  • Keep the sensitive value itself out of the record.

Enforce data policy where agents and models meet

See how runtime policy enforcement and audit logging can apply consistent block and redact decisions across prompts, context, and tool calls.

Request a Demo