Before AI

The prompt is a document, and it needs a redaction step

A practical guide to prompt redaction: what leaves the document, what to mask, and how to verify the result.

Prompt redaction: mask before the model sees it

The prompt is a document, and it needs a redaction step. A prompt is not only the sentence you type. It includes the system instruction, the conversation history, the retrieved context, the files and the tool results. Any field can carry a name, an account or a client reference.

What leaves the document

Treat the prompt as a document with fields. Mask each field that carries personal data, keep a mapping outside the model, and restore the values in the answer. A redaction step on the user message alone misses the rest.

Where the data hides

The prompt is only one layer. Check:

The redaction flow

  1. List the fields in the prompt.
  2. Classify the data in each field.
  3. Mask the personal data before the call.
  4. Send tokens and the task instructions.
  5. Restore on your side and verify the output.

Controls to verify

  • A schema for the prompt fields.
  • A mask on every field, not only the message.
  • A mapping store outside the model.
  • Payload-free logs.
  • A test with a unique marker in each field.

Retention and evidence

The prompt can be stored by the tool, by your application and by the logs. Each copy needs a retention rule. A deleted chat does not delete the request log or the evaluation set.

Limits

Masking a prompt does not mask a retrieved document that arrives later. Context can re-identify a person, and the output can leak a value that was never in the prompt.

The prompt as a document

A prompt is a document by another name: it carries the question, the context, the examples, and usually — the failure point — the raw material. The discipline is the document discipline applied upstream: decide the recipient before writing, include the minimum the task needs, and treat every pasted paragraph as data that leaves. A well-masked prompt teaches the model as well as a raw one; models reason about structure, not about whose name was attached.

Techniques that hold up

Three techniques cover most cases. Entity replacement with a mapping table on your side, when real values must return. Synthetic examples — made-up names in the same shape — for few-shot teaching. And the canary habit: seed a distinctive fake value and check where it resurfaces, because the answer to 'who saw this' for a prompt is empirical or it is nothing. Write the mapping table down; improvised masking drifts, and drift is how real values slip back in.

The file-upload case

Uploads deserve their own rule, because a file travels whole — metadata, comments, and revision history included. Before an upload: export a clean copy from the source system, run the same masking pass, and name the canary value you will check later. The upload button is the boundary; everything before it is preparation, and preparation is where the protection actually lives.

How Veilbrook fits

Veilbrook can redact the document before it becomes a prompt and restore the values on your side. The field schema and the logging are part of the integration.

Questions for the vendor

What good looks like

A good workflow is boring: the tool sees tokens, not the client; the mapping stays on your side; the history is short; and a second person can explain what was sent. The output still needs a review, because a model can infer a value that was never in the prompt.

Before you send

Classify the document, mask the identifiers, attach only what the task needs, and keep the mapping outside the tool. After the answer, restore the values on your side and check that the output did not reintroduce one. If the tool keeps the conversation, decide the retention before you start. A receipt is not a substitute for a review.

Common mistakes

Questions

Is redacting the user message enough?

No. The system prompt, history, context and attachments can carry data.

Should the output be checked?

Yes. A model can generate a value that was not in the prompt.

Is a token always safe?

No. A rare combination of tokens can still identify a person.