LM Warden
Keep secrets out of LLM prompts: sensitive data guard Video, 1:50, with English captions

Chapters

Secrets stay out of the prompt, whichever model answers.

The sensitive data guard finds keys, passwords, card numbers, e-mail addresses and phone numbers in a request and replaces each with a placeholder before any model sees it, on your GPUs or relayed to Anthropic. When the answer comes back, the real values are put back before your app gets it.

The path of a secret

  1. Your app sends a prompt with a secret in it.
  2. LM Warden recognises it and puts a placeholder in its place, such as ⟦LMW-SECRET-3f9a0c1d2e⟧. The same value always gets the same placeholder for a key.
  3. The model works with the placeholders.
  4. In the answer, streamed or not, in text and in tool-call arguments, the placeholders are swapped back for the real values.

The log keeps which rule matched, where, the length and a fingerprint, never the value. Request history, Prompt Lens and the content log see only placeholders.

Sanitize or block

Sanitize replaces and lets the request through. Block answers the first request in a session that carries a new value itself, instead of the model; sent again, the same conversation goes through sanitized. A value in the system prompt or the tool definitions is only ever replaced.

The rules come in packs: cloud and API keys, private keys, passwords in config and crypto wallet keys are on when you switch the guard on; payment cards, IBANs, e-mail and phone, and crypto addresses you add. You can write your own rules, as patterns or word lists, and give a pack its own action.

Per key

The platform setting, in Settings → Sensitive data, is off until you turn it on. Each key follows it, switches the guard off, or has its own rules. A Try it box shows what a text would become, without storing anything.

For on-premise and air-gapped setups that handle sensitive data: secrets never enter a model’s context, and nothing kept for monitoring contains them, also when a request goes on to Anthropic.

Coming, not available today

Stronger checks for a paid version are in development: rules for ID numbers, your own list of known names, a small model that finds names and dates, and keeping a request local when a check cannot finish. There is no date yet.