← Back to Dashboard
1. Data Classification and Prompt Hygiene2. Network Isolation and Encryption

Data Classification and Prompt Hygiene

📚 Security and Data Protection10 min100 XP

Do Not Send Secrets by Default

Classify request fields and strip unnecessary sensitive data before inference. Every token you send to a model is a token that transits your telemetry, your invocation logs, and - if you enabled full logging - your S3 buckets. Data minimization at the prompt boundary shrinks every downstream risk at once.

Classify, Then Decide Handling

ClassExamplesPrompt policy
PublicDocs, product namesSend freely
InternalTicket text, runbook contentSend if needed; keep out of third-party analytics
ConfidentialCustomer names, emails, account IDsMask or tokenise before inference where the task allows
RestrictedCredentials, keys, card/health dataNever in a prompt - strip at the boundary, alert on detection

Deterministic Masking Preserves Utility

# Before inference
"Customer jane.doe@acme.com (account 8842-19) reports card declined"
→ "Customer [EMAIL_1] (account [ACCT_1]) reports card declined"

# Model answers using placeholders → rehydrate after response
"Contact [EMAIL_1] to confirm the retry succeeded"
→ "Contact jane.doe@acme.com to confirm the retry succeeded"

Deterministic tokens (same input → same placeholder) keep multi-turn coherence and let you trace entities without exposing them. Bedrock Guardrails' sensitive information filters add a managed detection layer (PII types + custom regex, block or mask) - use both: your masking as primary, Guardrails as the safety net.

  • Redact credentials and personal identifiers where possible - secrets have zero legitimate reason to reach a model.
  • Use deterministic masking for traceability.
  • Separate business context from sensitive raw records - send the derived signal ("payment failed twice"), not the raw record.
Audit trick: run a PII detector over a sample of your own invocation logs. Whatever it finds is what you're already leaking into prompts today - fix the top offenders at the field level.
🧪 Knowledge Check
Press 1-4 to select1 of 2
A strong prompt hygiene practice is:
Include full raw records always
Redact/minimize sensitive data before inference
Disable logs globally
Share root credentials