Sensitive data in text
Detect which kind of sensitive data a ticket, message or log contains, so it can be redacted or handled correctly.
F@fLimits to keep in mind
Not a compliance control on its own. Combine with your data loss prevention tooling.
Problem
People paste passwords, card numbers and ID scans into tickets and chat. Once stored, that data spreads to exports, logs and AI tools.
Goal
Name the kind of sensitive data present so code can redact it, rotate exposed secrets, and restrict who sees the record.
Input / state
The text, after your pattern-based detectors have run.
- text
- The ticket, message or log excerpt.
- detector_hits
- Matches from regex or checksum detectors, such as card number patterns.
Decision question
sensitive_dataWhat kind of sensitive data does this text contain?
Options
noneNo passwords, payment data, identity numbers or health details.credentials_or_secretsPasswords, API keys, tokens, private keys or recovery codes.payment_card_dataCard numbers, expiry dates or security codes.government_idPassport, national ID, tax or driving licence numbers or images.health_informationDetails about someone's health, diagnosis or treatment.
Allowed outcomes
Decided in your code from the answer and its confidence. Thresholds are yours to set and test.
- No sensitive dataChoice is none and confidence meets your threshold.
- Rotate and redactChoice is credentials_or_secrets and confidence meets your threshold.
- Redact card dataChoice is payment_card_data and confidence meets your threshold.
- Redact IDChoice is government_id and confidence meets your threshold.
- Restrict and redactChoice is health_information and confidence meets your threshold.
- Privacy reviewConfidence is below your threshold: probability is spread across options.
Example scenarios
Predefined demonstrations. No model is called; the outcome shown is an illustrative judgment.
Example state
{
"text": "Printer on floor 3 is jammed again.",
"detector_hits": []
}Outcome
IllustrativeChoice is none and confidence meets your threshold.
Why
No sensitive data.
Using it well
- Run pattern and checksum detectors first; they catch formats reliably. This question catches what patterns miss, such as a password written in a sentence.
- Exposed secrets need rotating, not just redacting. Send them to whoever can revoke them.
- This identifies the kind of data only. What your organization must do with it is a matter for your privacy policy.
Request definition
POST https://api.typesafe.ai/v1/systemone{
"model": "jev-latest",
"state": {
"text": "<text>",
"detector_hits": "<detector_hits>"
},
"questions": {
"sensitive_data": {
"type": "choice",
"instructions": "What kind of sensitive data does this text contain?",
"criteria": {
"none": "No passwords, payment data, identity numbers or health details.",
"credentials_or_secrets": "Passwords, API keys, tokens, private keys or recovery codes.",
"payment_card_data": "Card numbers, expiry dates or security codes.",
"government_id": "Passport, national ID, tax or driving licence numbers or images.",
"health_information": "Details about someone's health, diagnosis or treatment."
}
}
}
}Request shape from the System One API reference; a Kev server accepts the same body. Replace the placeholder state with your data. Requests need your own API key or server.
Version History
Initial version