
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.
Part of prompt and agent redaction. For the adjacent case, read redact before ai agents and redact before ai agents. The wider branch is redact before ai.
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 system prompt and developer instructions
- Conversation history and memory
- Retrieved context and tool results
- Attachments and images
- The output and the logs
The redaction flow
- List the fields in the prompt.
- Classify the data in each field.
- Mask the personal data before the call.
- Send tokens and the task instructions.
- 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
- Which fields does the prompt contain?
- Are history and retrieval included?
- Where are prompts logged?
- How long are they retained?
- Can the output be restored safely?
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
- Masking the body but not the attachment.
- Sending the history from an earlier task.
- Trusting a setting instead of testing the output.
- Calling a masked document anonymous.
- Leaving the mapping in the same folder as the prompt.