docs: use enterprise-safe examples in content moderation pages#792
Conversation
|
Preview deployment for your docs. Learn more about Mintlify Previews.
💡 Tip: Enable Workflows to automatically generate PRs for you. |
There was a problem hiding this comment.
Pull request overview
This PR updates Dify’s content moderation documentation to replace violent/profane (and one politically charged) example text with enterprise-safe examples while preserving the same moderation demonstration behavior across localized copies.
Changes:
- Replaced violent/profane sample inputs/outputs in Moderation API Extension docs with PII-style examples (SSN/phone, national ID/phone, MyNumber/phone) and corresponding masked outputs.
- Updated Moderation Tool keyword examples to use non-violent, enterprise-safe keywords and scenarios, including neutralizing a previously political example.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| zh/use-dify/workspace/api-extension/moderation-api-extension.mdx | Replaces violent/profane moderation examples with ID/phone examples and masked outputs (ZH). |
| versions/3-0-x/zh/user-guide/application-orchestrate/app-toolkits/moderation-tool.mdx | Updates keyword and moderation-extension examples to enterprise-safe scenarios (ZH, versioned). |
| versions/3-0-x/en/user-guide/extension/api-based-extension/moderation.mdx | Replaces violent/profane moderation examples with SSN/phone examples and masked outputs (EN, versioned). |
| versions/3-0-x/en/user-guide/application-orchestrate/app-toolkits/moderation-tool.mdx | Updates keyword example to use “confidential” instead of violent content (EN, versioned). |
| ja/use-dify/workspace/api-extension/moderation-api-extension.mdx | Replaces violent/profane moderation examples with MyNumber/phone examples and masked outputs (JA). |
| en/use-dify/workspace/api-extension/moderation-api-extension.mdx | Replaces violent/profane moderation examples with SSN/phone examples and masked outputs (EN). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 6 out of 6 changed files in this pull request and generated 8 comments.
Comments suppressed due to low confidence (1)
versions/3-0-x/zh/user-guide/application-orchestrate/app-toolkits/moderation-tool.mdx:27
- There’s duplicated punctuation at the end of the sentence ("...usage policy." followed by "。"), which reads as a typo. Drop one of the sentence terminators (either keep the English period inside the quotes or use the Chinese full stop after the quote).

比如我们在自己的本地服务中自定义敏感词审查规则:不能查询有关公司内部薪资的问题。当用户在`query`变量输入"薪资",则在对话时会返回 "Your content violates our usage policy."。
0dac8b9 to
53e1e8e
Compare
53e1e8e to
42985e6
Compare
This reverts commit d0854eb.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Dify's content moderation docs used violent and profane example text, visible on the live "Sensitive Content Moderation" page. Official materials should not contain this kind of language. This PR replaces the flagged examples across every language copy with enterprise-safe equivalents that demonstrate the same moderation behavior, and also neutralizes a politically charged example found during a broader review.