How to keep card numbers, SSNs and secrets away from the AI model
Short answer: filter tool results before they reach the model. When the AI looks up a customer, an invoice or an HR record, the result passes through a data filter that replaces payment card numbers, Social Security numbers and credentials with a labelled placeholder, or refuses the whole result. The model then works with everything else, and the audit trail records how much was removed, never the values.
Why filter results, not prompts
Most sensitive data reaches an AI from the systems it looks things up in: a support ticket with a pasted card number, an HR export with SSNs, a config file with an API key. Filtering what people type misses all of it. A filter on the tool results catches it at the one place every lookup passes through.
What a good filter does
- Payment cards: 13 to 19 digits, with or without spaces or dashes, confirmed with the card checksum so most order and account numbers are left alone. Redacted as "card ending 4242".
- Social Security numbers in the dashed form, skipping ranges that are never issued.
- Credentials: AWS access keys, OpenAI, Anthropic, GitHub, Slack and Google API keys, bearer tokens and private key blocks.
- Email addresses and phone numbers as options, off by default, because most business tools legitimately return them.
Fixed patterns, no model judging a model: the same input always gives the same result, which is what an auditor wants to hear.
Set it up in Acutis Gate
In Acutis Gate the filter is on from the start for cards, SSNs and secrets, in redact mode.
- Open Guardrails → Data filter.
- Choose the mode: redact (replace with a labelled placeholder), block (refuse the call and record it) or off.
- Tick the categories: cards, SSNs and secrets are on by default; add email and phone if your policy needs them.
- Save, then look up a record you know contains a test card number and check the result and the audit row.
What the model receives, and what the trail keeps:
Result to the model: Refund issued to card [REDACTED card ending 4242] for order 88123. Audit row: tool=crm__get_ticket decision=allow redacted: 1 card
In block mode the model is told only that the result contained filtered data and nothing was returned. Approved calls pass through the same filter when they run.
Sensitive data filtered before the model reads it
Gate redacts or blocks cards, SSNs and secrets in every tool result, with the counts in your audit trail.
Start a 14-day trial Tour the live GateFrequently asked questions
How do I stop AI from seeing credit card numbers?
Filter tool results before the model reads them. A filter that matches 13 to 19 digit numbers and confirms them with the card checksum can redact them to the last four digits or block the result.
Does the audit trail store the redacted values?
No. Gate records only how many items of each kind were redacted, never the values.
Will redacting break the AI's answers?
Rarely. The rest of the record still reaches the model, and placeholders like "card ending 4242" keep enough context for most tasks.
Can I block a result instead of redacting it?
Yes. Block mode refuses the whole result when it contains a filtered item, tells the model nothing was returned, and records the event.
Acutis