Redact sensitive fields
Output redacted text and a field log; do not guess unlisted fields.
Prompt effect has not been tested.
A prompt is a re-runnable template, not a promise of results. Changing the model, version or input can change the outcome. Use the checkpoints on this page to verify it yourself, and treat the official sources as evidence of mechanism rather than a guarantee of effect.
Task and inputs
Output redacted text and a field log; do not guess unlisted fields. Inputs: Source text, sensitive-field list, and redaction format.
The prompt
Redact the source according to {fields}. Output redacted_text and redactions[] with field, location and replacement. Handle only listed fields; put suspected but unlisted fields in review[] without redacting them. replacement uses {format} and must not retain reversible original values.
Replace {field} placeholders with the current inputs before running.
Expected output shape
redacted_text, redactions[], and review[].
Checkpoints
- Listed fields are replaced irreversibly.
- Review items are not handled without authorisation.
- Locations link back to the source.
Failure branches
- Missed redaction: extend the field list and rerun.
- Over-redaction: move unlisted items back to review.
Sources and limits
This site has not tested the effect of this prompt. See the sources for the mechanism; changing model, version or input can change the result.
Sources
| Source | URL |
|---|---|
| OpenAI Cookbook: How to use guardrails (official repository raw, fetched 200 on 2026-11-07) | https://raw.githubusercontent.com/openai/openai-cookbook/main/examples/How_to_use_guardrails.ipynb |
Source snapshot: 2026-11-07; item-specific rechecks and their scope are recorded in the text or source notes. Features and terms may change; check the original sources before use.