敏感字段脱敏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
按清单 {fields} 脱敏原文。输出 redacted_text 与 redactions[]:field、location、replacement。只处理清单内字段;疑似但不在清单的字段列 review[],不自行脱敏。replacement 使用 {format},不得保留可逆原始值。
占位符用 {字段} 标注,运行前替换为本次输入。
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[]、review[]。
redacted_text, redactions[], and review[].
检查点Checkpoints
- 清单字段全部替换且不可逆。
- review 项未被擅自处理。
- location 可回连原文。
- Listed fields are replaced irreversibly.
- Review items are not handled without authorisation.
- Locations link back to the source.
失败分支Failure branches
- 漏脱敏:补字段清单重跑。
- 过度脱敏:把非清单项移回 review。
- 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(官方仓库 raw,2026-11-07 直抓 200)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.ipynbhttps://raw.githubusercontent.com/openai/openai-cookbook/main/examples/How_to_use_guardrails.ipynb |
资料快照日期:2026-11-07;单项复核范围与日期见对应正文或来源记录。产品功能与条款可能变化,使用前请核对原始来源。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.