Skip to main content
A customer-facing agent must not see PII. Deasy Labs ships a proprietary sensitive-data classification engine with 40+ built-in classifiers (Social Security Number, Credit Card, Date of Birth, Physical Address, and more) that combines pattern matching with AI context, understanding meaning, not just format. This cookbook runs that detection through the SDK and gates a data slice on the result, so restricted content never reaches downstream AI systems. Sensitivity is an opt-in component of readiness, chosen per use case. In the app you enable it when creating a Project; here you run it headlessly.
You do not write detection logic. The classifiers are built in, and when sensitivity detection runs, the platform automatically adds three rule-based tags: PII (Personally Identifiable Information), PCI (Payment Card Industry Data), and PHI (Protected Health Information). PII detection currently supports English documents only.

The Flow

Step 1. Review the Built-In Sensitivity Catalog

The catalog covers identity, financial, health, and contact data: Social Security Number, Credit Card, Tax ID, Date of Birth, Full Name, Physical Address, Phone Number, Policy Number, and more.

Step 2. Run Sensitivity Detection

Include the sensitivity tags in a classification job. The platform runs its sensitivity strategy at the highest merge priority and writes the detected values, plus the PII, PCI, and PHI rule-based tags, as file-level metadata.

Step 3. Review What Was Found

Every detection carries evidence and confidence, so findings are auditable.

Step 4. Encode the Policy as a Rule-Based Tag

Turn the detection results into a deterministic access verdict. A rule-based tag evaluates conditions over other tags’ values at zero LLM cost: if a rule matches, the value resolves deterministically, and if none match, the tag falls back to its other configured strategy, pattern matching or LLM classification, depending on the tag definition.
The policy now lives on the documents themselves: re-running classification re-evaluates the rule, and every downstream system reads one tag instead of re-deriving the logic.

Step 5. Gate the Slice

Build the use case’s slice so restricted content is excluded. This is the sensitivity component of the AI-ready gate: which dimensions matter, including whether sensitivity is part of the gate, is decided per use case.
Export this slice, and only it, to the systems your agents read from. Documents with sensitive content stay behind the gate for review.

Custom Patterns

For organization-specific identifiers (employee IDs, claim numbers, internal codes), describe the pattern and let the platform engineer it, including the context keywords that keep precision high. The full loop, with generated test cases that prove the pattern before it runs at scale, is in Precision Patterns for Sensitive Data.

PII Categories Reference

How to Use This

  • Per use case. An internal legal workspace may allow PII that a customer-facing agent must never see. Gate each slice with its own rules.
  • In a project. Enable Sensitive Data Detection when creating a Project to make the scan part of the standard workspace setup.
  • Composed with quality. Combine the sensitivity conditions with the Data Quality Status exclusion from Prepare an AI-Ready Dataset for a gate that covers both.

Next Steps

Prepare an AI-Ready Dataset

Add the quality dimensions to the gate.

Projects

Enable sensitivity detection per workspace.

Clean Up a RAG Index

Ship the gated slice to a vector database.

Taxonomies and Tags

Tag strategies: LLM, Pattern, Rule-based, Sensitivity.