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
- ClassifyIdentify the data class and detector confidence at each boundary.
- EvaluateWeigh severity, reversibility, destination trust, and task need.
- EnforceBlock, redact, or allow before content reaches the model or tool.
- 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.
| Action | When it applies | Key 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.